3.2.4.3.3 DirectoryServiceServer (Opnum 17)

The DirectoryServiceServer method is received by the server in an RPC_REQUEST packet. In response, the server MUST return a string that contains the name of the current directory computer.

 [propget] HRESULT DirectoryServiceServer(
   [out, retval] BSTR* pbstrDirectoryServiceServer
 );

pbstrDirectoryServiceServer: A pointer to a BSTR that, when successfully completed, contains the name of the directory computer in DNS or NetBIOS format, prefixed by "\\". The string MUST use the following format, which is specified in ABNF.

 DirectoryServer ="\\" Name
 Alpha           = %x41-5A / %x61-7A
 Name            =1*255Alpha

Return Values: The method MUST return S_OK (0x00000000) to indicate success or an implementation-specific error HRESULT on failure.

When the server processes this call, it MUST follow these guidelines:

  • If the ComputerName instance variable is NULL:

    • Set the pbstrDirectoryServiceServer output variable to the DNS or NetBIOS name of the directory computer,<16> prefixed by "\\".

  • Else:

    • The server MUST generate a QMMgmt Get Info event with the following inputs:

      • iPropID = PROPID_MGMT_MSMQ_DSSERVER

    • If the rStatus return value is not equal to MQ_OK (0x00000000), the server MUST return rStatus and MUST take no further action. Otherwise, the pbstrDirectoryServiceServer output variable MUST be set to the value of the returned rPropVar.