ReactOS 0.4.15-dev-7924-g5949c20
DsRoleGetPrimaryDomainInformation.c
Go to the documentation of this file.
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 * Copyright 2018 Serge Gautherie <reactos-git_serge_171003@gautherie.fr>
7 */
8
9#include <apitest.h>
10
11#define WIN32_NO_STATUS
12#include <windef.h>
13#include <winbase.h>
14#include <dsrole.h>
15
17{
18 DWORD dwErrorCode;
20
21 // Get information about the domain membership of this computer.
23 ok(dwErrorCode == ERROR_SUCCESS, "DsRoleGetPrimaryDomainInformation returns %lu!\n", dwErrorCode);
24 if (pInfo == NULL)
25 {
26 skip("pInfo is NULL\n");
27 return;
28 }
29
30 ok(pInfo->MachineRole >= DsRole_RoleStandaloneWorkstation && pInfo->MachineRole <= DsRole_RolePrimaryDomainController, "pInfo->MachineRole is %u!\n", pInfo->MachineRole);
31 DsRoleFreeMemory(pInfo);
32}
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define START_TEST(x)
Definition: atltest.h:75
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
@ DsRole_RolePrimaryDomainController
Definition: dsrole.h:44
@ DsRole_RoleStandaloneWorkstation
Definition: dsrole.h:39
@ DsRolePrimaryDomainInfoBasic
Definition: dsrole.h:32
unsigned long DWORD
Definition: ntddk_ex.h:95
VOID WINAPI DsRoleFreeMemory(_In_ PVOID Buffer)
Definition: dssetup.c:82
DWORD WINAPI DsRoleGetPrimaryDomainInformation(LPCWSTR lpServer, DSROLE_PRIMARY_DOMAIN_INFO_LEVEL InfoLevel, PBYTE *Buffer)
Definition: dssetup.c:92
BYTE * PBYTE
Definition: pedump.c:66
DSROLE_MACHINE_ROLE MachineRole
Definition: dsrole.h:63