3.2.4.2.2 MachineNameOfMachineId (Opnum 9)
The MachineNameOfMachineId method is received by the server in an RPC_REQUEST packet. In response, the server MUST return a string that contains the QueueManager.ComputerName of the QueueManager that is identified by the bstrGuid input parameter.
-
HRESULT MachineNameOfMachineId( [in] BSTR bstrGuid, [out, retval] BSTR* pbstrMachineName );
bstrGuid: A BSTR that specifies an identifier for the computer name, in the GUID format. The server MUST accept GUIDs with or without surrounding curly braces ({ }).
pbstrMachineName: A pointer to a BSTR that after successful completion, contains the computer name in the DNS or Universal Naming Convention (UNC) format.
Return Values: The method MUST return S_OK (0x00000000) to indicate success or an implementation-specific error HRESULT on failure.<12>
When processing this call, the server MUST follow these guidelines:
Retrieve the QueueManager, referred to here as DirectoryQueueManager, from the directory as follows:
Generate a Read Directory ([MS-MQDMPR] section 3.1.7.1.20) event with the following inputs, where bstrGuid is the bstrGuid input parameter:
iDirectoryObjectType = QueueManager.
iFilter = "Identifier" EQUALS bstrGuid.
iAttributeList = a list consisting of two ADM attribute names, Identifier and ComputerName. Set Identifier to QueueManager.Identifier.
If the rStatus return value is not equal to DirectoryOperationResult.Success:
Return an error HRESULT, and take no further action.
Set the pbstrMachineName output variable to ComputerName.