1 /* 2 * PROJECT: ReactOS netapi32.dll API Tests 3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) 4 * PURPOSE: Tests for DsRoleGetPrimaryDomainInformation 5 * COPYRIGHT: Copyright 2017 Colin Finck (colin@reactos.org) 6 */ 7 8 #include <apitest.h> 9 10 #define WIN32_NO_STATUS 11 #include <windef.h> 12 #include <winbase.h> 13 #include <dsrole.h> 14 15 START_TEST(DsRoleGetPrimaryDomainInformation) 16 { 17 DWORD dwErrorCode; 18 PDSROLE_PRIMARY_DOMAIN_INFO_BASIC pInfo = NULL; 19 20 // Get information about the domain membership of this computer. 21 dwErrorCode = DsRoleGetPrimaryDomainInformation(NULL, DsRolePrimaryDomainInfoBasic, (PBYTE*)&pInfo); 22 ok(dwErrorCode == ERROR_SUCCESS, "DsRoleGetPrimaryDomainInformation returns %lu!\n", dwErrorCode); 23 ok(pInfo->MachineRole >= DsRole_RoleStandaloneWorkstation && pInfo->MachineRole <= DsRole_RolePrimaryDomainController, "pInfo->MachineRole is %u!\n", pInfo->MachineRole); 24 25 if (pInfo) 26 DsRoleFreeMemory(pInfo); 27 } 28