Export (0) Print
Expand All NetrEnumerateTrustedDomains (Opnum 19)

The NetrEnumerateTrustedDomains method returns a set of NetBIOS names of trusted domains.

 NTSTATUS NetrEnumerateTrustedDomains(
   [in, unique, string] LOGONSRV_HANDLE ServerName,
   [out] PDOMAIN_NAME_BUFFER DomainNameBuffer

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

DomainNameBuffer: A pointer to a DOMAIN_NAME_BUFFER structure, as specified in section, that contains a list of trusted domain names. The format of domain names contained in the buffer is specified in section

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

The server initializes the DomainNames field of the DOMAIN_NAME buffer to the empty string. The server calls the NetrEnumerateTrustedDomainsEx method and for each PDS_DOMAIN_TRUSTSW element of the NETLOGON_TRUSTED_DOMAIN_ARRAY, appends the NetbiosDomainName field to the DomainNames field of the DOMAIN_NAME_BUFFER (section Then the server terminates the DomainNames field with two null bytes.

For details, see section, Receiving NetrEnumerateTrustedDomainsEx.

© 2016 Microsoft