3.2.4.1.1 MachineIdOfMachineName (Opnum 7)
The MachineIdOfMachineName method is received by the server in an RPC_REQUEST packet. In response, the server MUST return a string that contains the QueueManager.Identifier for the computer name that was passed as the input parameter.
-
HRESULT MachineIdOfMachineName( [in] BSTR MachineName, [out, retval] BSTR* pbstrGuid );
MachineName: A BSTR that specifies the NETBIOS or DNS computer name for which a GUID is to be retrieved.
-
If this input parameter is NULL, the local QueueManager.ComputerName MUST be used as the value of this input parameter.
pbstrGuid: A pointer to a BSTR that upon successful completion, contains the string representation of the specified machine GUID. The server MUST NOT include the surrounding curly braces ({ }) with the returned GUID. The string MUST use the following format, which is specified in ABNF.
-
guid = dword-part "-" word-part "-" word-part "-" 2byte-part "-" 6byte-part dword-part = 2word-part word-part = 2byte-part byte-part = 2hex-digit hex-digit = %x30-39 / %x41-46 / %x61-66
Return Values: The method MUST return S_OK (0x00000000) to indicate success or an implementation-specific error HRESULT on failure.<9>
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 MachineName is the MachineName input parameter:
iDirectoryObjectType = QueueManager.
iFilter = "ComputerName" EQUALS MachineName.
iAttributeList = QueueManager.Identifier.
If the rStatus return value is not equal to DirectoryOperationResult.Success:
Return an error HRESULT, and take no further action.
Set the pbstrGuid output variable to DirectoryQueueManager.Identifier; it MUST NOT contain the braces ({ }) around the GUID value.