Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DsRoleGetPrimaryDomainInformation function

The DsRoleGetPrimaryDomainInformation function retrieves state data for the computer. This data includes the state of the directory service installation and domain data.

Syntax


DWORD DsRoleGetPrimaryDomainInformation(
  _In_   LPCWSTR lpServer,
  _In_   DSROLE_PRIMARY_DOMAIN_INFO_LEVEL InfoLevel,
  _Out_  PBYTE *Buffer
);

Parameters

lpServer [in]

Pointer to null-terminated Unicode string that contains the name of the computer on which to call the function. If this parameter is NULL, the local computer is used.

If this parameter refers to a Windows NT 4.0 computer, state data can be retrieved only if the InfoLevel parameter contains DsRolePrimaryDomainInfoBasic.

InfoLevel [in]

Contains one of the DSROLE_PRIMARY_DOMAIN_INFO_LEVEL values that specify the type of data to retrieve. This parameter also determines the format of the data supplied in Buffer.

Buffer [out]

Pointer to the address of a buffer that receives the requested data. The format of this data depends on the value of the InfoLevel parameter.

The caller must free this memory when it is no longer required by calling DsRoleFreeMemory.

Return value

If the function is successful, the return value is ERROR_SUCCESS.

If the function fails, the return value can be one of the following values.

Return codeDescription
ERROR_INVALID_PARAMETER

One or more parameters are invalid.

ERROR_NOT_ENOUGH_MEMORY

A memory allocation failure occurred.

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Dsrole.h

Library

Netapi32.lib

DLL

Netapi32.dll

See also

DSROLE_PRIMARY_DOMAIN_INFO_BASIC
DSROLE_UPGRADE_STATUS_INFO
DSROLE_OPERATION_STATE_INFO
DsRoleFreeMemory
Directory Service Functions

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.