MprAdminGetPDCServer

[This is preliminary documentation and subject to change.]

The MprAdminGetPDCServer function retrieves the name of the server with the master User Accounts Subsystem (UAS) from either a domain name or a server name. This server will be either the primary domain controller or a backup domain controller. Either the domain name parameter or the server name parameter may be NULL, but not both.

DWORD MprAdminGetPDCServer(
    const WCHAR *   lpwsDomainName,  // pointer to domain name
    const WCHAR *   lpwsServerName,  // pointer to server name
          LPWSTR    lpwsPDCServer    // pointer to buffer to receive 
                                     // name of server with UAS
);
 

Parameters

lpwsDomainName
Pointer to a Unicode string containing the name of the domain for which to retrieve the server with the UAS.
lpwsServerName
Pointer to a Unicode string containing the name of a PDC or BDC in the domain for which to retrieve the server with the UAS.
lpwsPDCName
Pointer to a buffer at least UNCLEN+1 WCHARs in size. Upon successful return, this buffer will contain the name of the PDC or a BDC for the specified domain. See lmcons.h for more information.

Return Values

If the function succeeds, the return value will be NO_ERROR.

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

Value Meaning
NERR_DCNotFound Could not find the domain controller for the domain.
ERROR_INVALID_NAME The name could not be found.

QuickInfo

  Windows NT: Use version 5.0 and later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in mprapi.h.
  Import Library: Link with mprapi.lib.