3.1.6.12 Get Directory Object

This event MUST be generated with the following arguments:

  • iObjectType: a value defined in section 2.2.8 that identifies the object type.

  • iPathName: a string that can be used to locate the directory object.

  • iGuid: a GUID that can be used to locate the directory object.

Return Values:

  • rStatus: An HRESULT indicating the result of the operation.

  • rObject: the directory object that matches the supplied arguments.

The server SHOULD<136> perform the following actions to process this event:

  • Let directoryObjectType be a string that identifies the object type.

  • Let directoryFilter be an array of attribute-filter expressions ([MS-MQDMPR] section 3.1.7.1.20).

  • If iObjectType is MQDS_QUEUE:

    • Set directoryObjectType to "Queue".

    • If iPathName is not NULL, set directoryFilter to "PathName" EQUALS iPathName Else If iGuid is not NULL, set directoryFilter to "Identifier" EQUALS iGuid.

  • Else If iObjectType is MQDS_USER:

    • If iGuid is NULL, set rStatus to a failure HRESULT, and take no further action.

    • Else set directoryObjectType to "User", and set directoryFilter to "Identifier" EQUALS iGuid.

  • Else If iObjectType is MQDS_MACHINE:

    • Set directoryObjectType to "QueueManager".

    • If iPathName is not NULL, set directoryFilter to "FullPath" EQUALS iPathName Else If iGuid is not NULL, set directoryFilter to "Identifier" EQUALS iGuid.

  • Else If iObjectType is MQDS_SITE or MQDS_CN:

    • Set directoryObjectType to "Site".

    • If iPathName is not NULL, set directoryFilter to "FullPath" EQUALS iPathName Else If iGuid is not NULL, set directoryFilter to "Identifier" EQUALS iGuid.

  • Else If iObjectType is MQDS_ENTERPRISE:

    • Set directoryObjectType to "Enterprise".

  • Else If iObjectType is MQDS_ROUTINGLINK:

    • Set directoryObjectType to "RoutingLink".

    • If iPathName is not NULL, set directoryFilter to "FullPath" EQUALS iPathName Else If iGuid is not NULL, set directoryFilter to "Identifier" EQUALS iGuid.

  • Else:

    • Set rStatus to a failure HRESULT and take no further action.

  • Generate the Read Directory ([MS-MQDSSM] section 3.1.6.3) event with the following argument to find the directory object:

    • iDirectoryObjectType := directoryObjectType

    • iFilter := directoryFilter

  • If the event returns DirectoryOperationResult.Success, set rStatus to 0x00000000, and set rObject to the returned rDirectoryObject; otherwise, set rStatus to a failure HRESULT, and take no further action.

  • If iObjectType is MQDS_CN:

    • Let refSite be a Site ADM element instance, and set it to rObject.

    • Create a new ConnectedNetwork ADM element instance, and assign it to rObject. Initialize rObject as follows:

      • Identifier := refSite.Identifier

      • Name := refSite.Name

      • NetworkProtocol := IP if refSite.ForeignSite is False or Foreign otherwise

  • Set rStatus to 0x00000000.