2017-06-26 15:19:07 +00:00
/*
* PROJECT : ReactOS netapi32 . dll API Tests
2017-09-29 18:33:04 +00:00
* LICENSE : GPL - 2.0 + ( https : //spdx.org/licenses/GPL-2.0+)
2017-06-26 15:19:07 +00:00
* PURPOSE : Tests for DsRoleGetPrimaryDomainInformation
2017-09-29 18:33:04 +00:00
* COPYRIGHT : Copyright 2017 Colin Finck ( colin @ reactos . org )
2018-06-08 14:24:05 +00:00
* Copyright 2018 Serge Gautherie < reactos - git_serge_171003 @ gautherie . fr >
2017-06-26 15:19:07 +00:00
*/
# include <apitest.h>
# define WIN32_NO_STATUS
# include <windef.h>
# include <winbase.h>
# include <dsrole.h>
START_TEST ( DsRoleGetPrimaryDomainInformation )
{
DWORD dwErrorCode ;
PDSROLE_PRIMARY_DOMAIN_INFO_BASIC pInfo = NULL ;
// Get information about the domain membership of this computer.
dwErrorCode = DsRoleGetPrimaryDomainInformation ( NULL , DsRolePrimaryDomainInfoBasic , ( PBYTE * ) & pInfo ) ;
ok ( dwErrorCode = = ERROR_SUCCESS , " DsRoleGetPrimaryDomainInformation returns %lu! \n " , dwErrorCode ) ;
2018-06-08 14:24:05 +00:00
if ( pInfo = = NULL )
{
skip ( " pInfo is NULL \n " ) ;
return ;
}
2017-06-26 15:19:07 +00:00
2018-06-08 14:24:05 +00:00
ok ( pInfo - > MachineRole > = DsRole_RoleStandaloneWorkstation & & pInfo - > MachineRole < = DsRole_RolePrimaryDomainController , " pInfo->MachineRole is %u! \n " , pInfo - > MachineRole ) ;
DsRoleFreeMemory ( pInfo ) ;
2017-06-26 15:19:07 +00:00
}