3.5.4.7.2 NetrEnumerateTrustedDomainsEx (Opnum 36)

The NetrEnumerateTrustedDomainsEx method<291> returns a list of trusted domains from a specified server. This method extends NetrEnumerateTrustedDomains by returning an array of domains in a more flexible DS_DOMAIN_TRUSTSW structure, as specified in section 2.2.1.6.2, rather than the array of strings in DOMAIN_NAME_BUFFER structure, as specified in section 2.2.1.6.1. The array is returned as part of the NETLOGON_TRUSTED_DOMAIN_ARRAY structure, as specified in section 2.2.1.6.3.

 NET_API_STATUS NetrEnumerateTrustedDomainsEx(
   [in, unique, string] LOGONSRV_HANDLE ServerName,
   [out] PNETLOGON_TRUSTED_DOMAIN_ARRAY Domains
 );

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

Domains: A pointer to a NETLOGON_TRUSTED_DOMAIN_ARRAY structure, as specified in section 2.2.1.6.3, that contains an array of DS_DOMAIN_TRUSTSW structures, as specified in section 2.2.1.6.2, one for each trusted domain.

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

This method is a wrapper for DsrEnumerateDomainTrusts, which strips off the F flag from the returned data for backward compatibility. For details, see section 3.5.4.7.1.

Show: