3.1.4.1.1 I_BrowserrQueryOtherDomains (Opnum 2)

The I_BrowserrQueryOtherDomains method is received by the server in an RPC_REQUEST packet. The client SHOULD NOT send this RPC request to a server that is not a primary domain controller (PDC) acting as the domain master browser server.

If this server is not a primary domain controller it MAY fail the request.<3>

If the server is a primary domain controller, the server MUST update OtherDomains as specified in [MS-WKST] section 3.2.6.1, WkstaQueryOtherDomains Event. The server MUST construct a SERVER_ENUM structure as specified in 2.2.3.2, containing a SERVER_INFO_100 structure as specified in [MS-DTYP] section 2.3.11 for each name in OtherDomains, and return this to the caller.

 NET_API_STATUS I_BrowserrQueryOtherDomains(
   [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName,
   [in, out] LPSERVER_ENUM_STRUCT InfoStruct,
   [out] LPDWORD TotalEntries
 );

ServerName: An optional BROWSER_IDENTIFY_HANDLE structure that specifies the name of the server to execute the method. This value is ignored upon receipt.

InfoStruct: A pointer to a SERVER_ENUM_STRUCT structure that contains the Level member and a pointer to a SERVER_INFO_x structure, where <x> MUST be 100. The Level member MUST be set to 100. If the Level member is set to any other value, the method MUST return ERROR_INVALID_LEVEL.<4>

TotalEntries: The number of entries returned by the method call. This parameter MUST match the EntriesRead member of the SERVER_INFO_100_CONTAINER structure.

Return Values: The method returns NERR_Success on success; otherwise, it returns a nonzero error code, as specified in either Win32 Error Codes. The most common error codes are listed in the following table.<5>

Return value/code

Description

0x00000000

NERR_Success

The operation completed successfully.

0x00000005

ERROR_ACCESS_DENIED

Access is denied.

0x00000008

ERROR_NOT_ENOUGH_MEMORY

This value MUST be returned when the server could not allocate enough memory to complete this operation.

0x00000057

ERROR_INVALID_PARAMETER

This value MUST be returned when a parameter is incorrect. For example, this value is returned when the InfoStruct parameter is NULL or the Level100 member in the structure pointed to by the InfoStruct parameter is NULL.

0x0000007C

ERROR_INVALID_LEVEL

This value MUST be returned when the Level member is not 100.

0x000000EA

ERROR_MORE_DATA

The error ERROR_MORE_DATA indicates that not all available entries were returned. Some more entries exist which were not returned in the response.