Export (0) Print
Expand All NetrGetAnyDCName (Opnum 13)

The NetrGetAnyDCName method<225> retrieves the name of a domain controller in the specified primary or directly trusted domain. Only DCs can return the name of a DC in a specified directly trusted domain.

  [in, unique, string] LOGONSRV_HANDLE ServerName,
  [in, unique, string] wchar_t* DomainName,
  [out, string] wchar_t** Buffer

ServerName: The custom RPC binding handle, as specified in section

DomainName: A null-terminated Unicode string that contains the name of the primary or directly trusted domain. If the string is NULL or empty (that is, the first character in the string is the null-terminator character), the primary domain name (3) is assumed.

Buffer: A pointer to an allocated buffer that contains the null-terminated Unicode string containing the NetBIOS name of a DC in the specified domain. The DC name is prefixed by two backslashes (\\).

Return Values: The method returns 0x00000000 on success; otherwise, it returns a nonzero error code.<226>

The server MUST attempt to locate a DC for the domain specified by the client. The server MAY<227> implement alternate means to locate domain controllers: for example, a static list in a file, or the two methods detailed in [MS-ADTS] section 6.3.6. If the server that receives this call is the PDC for the domain specified in DomainName, the server MUST return ERROR_NO_SUCH_DOMAIN.

If the ServerName parameter is not a valid binding handle (as described in section, the server MUST return ERROR_INVALID_COMPUTERNAME.

This method also returns errors based on Common Error Processing Rule E, specified in section 3.

NetrGetAnyDcName returns the name of the discovered DC.

© 2015 Microsoft