3.3.4.8 S_DSGetGCListInDomain (Opnum 8)

The S_DSGetGCListInDomain method returns the list of Global Catalog Servers in the specified domain.

 HRESULT S_DSGetGCListInDomain(
   [in] handle_t hBind,
   [in, ptr] const wchar_t* lpwszComputerName,
   [in, ptr] const wchar_t* lpwszDomainName,
   [out, string] wchar_t** lplpwszGCList,
   [in] PCONTEXT_HANDLE_SERVER_AUTH_TYPE phServerAuth,
   [out, size_is(*pdwServerSignatureSize)] 
     unsigned char* pbServerSignature,
   [in, out] LPBOUNDED_SIGNATURE_SIZE pdwServerSignatureSize
 );

hBind:  MUST specify an RPC binding handle, as specified in [MS-RPCE] section 2.

lpwszComputerName:  MUST be set by the client to NULL. The server will validate the NULL setting.

lpwszDomainName:  MUST be set by the client to the domain name of the domain to query.

lplpwszGCList:  MUST be set by the server to the list of Global Catalog Servers. The format of the list is a Server Specification List String.

phServerAuth:  A PCONTEXT_HANDLE_SERVER_AUTH_TYPE RPC context handle acquired from the pphServerAuth parameter in a previous call to S_DSValidateServer. The server MUST use this parameter as a key to locate the GSS security context used to compute the signature returned in pbServerSignature.

pbServerSignature:  MUST be set by the server to a buffer that contains a signed hash over the returned list of Global Catalog Servers (lplpwszGCList) calculated by using the MD5 algorithm (as specified in [RFC1321]) and the GSS security context, as specified by the following pseudocode.

 Initialize an MD5 Hash context
 Add to the hash context the DWORD value 0x00000001
 Add to the hash value the DWORD value of VT_BLOB
 SET cbSize to the size in bytes of the Server List string in 
     lplpwszGCList
 Add to the hash value the DWORD value cbSize
 Add to the hash context the contents of lplpwszGCList where the 
        length for the data is cbSize
 Call GSS_Wrap using the output_context_handle from GSS 
        security context and the computed MD5 hash
 SET pbServerSignature to the wrapped MD5 hash
 SET *pdwServerSignatureSize to the size of the wrapped MD5 hash

pdwServerSignatureSize:  MUST be set by the client to point to a DWORD that contains the maximum size in bytes of the server signature to return, and MUST be set by the server to contain the actual size in bytes of the server signature on output.

Return Values:  If the method succeeds, the return value is MQ_OK (0x00000000). If the method fails, the return value is an implementation-specific error code.

MQ_OK (0x00000000)

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol, Remote Procedure Call Protocol Extensions, as specified in [MS-RPCE].