3.1.6.13 Remove Object from Directory

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.

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

  • If iObjectType equals MQDS_QUEUE:

    • Create a Queue ADM element instance and set Queue.PathName to iPathName and Queue.Identifier to iGuid.

    • Generate the Delete Directory Object ([MS-MQDSSM] section 3.1.6.2) event with the iDirectoryObject argument set to the newly created Queue ADM element instance.

    • If the preceding event does not return DirectoryOperationResult.Success, set rStatus to a failure HRESULT, and take no further action.

    • If the Computer portion of the Queue.PathName (as specified in [MS-MQMQ] section 2.1.1) is different from the LocalQueueManager.ComputerName, the server MAY<138> do the following:

      • Generate a Send Change Notification event as specified in [MS-MQCN] section 3.3.4.1 with the following arguments:

        • iOperation := QueueDeletion

        • iDirectoryObject := the deleted Queue ADM element instance

  • Else if iObjectType equals MQDS_MACHINE:

    • Create a QueueManager ADM element instance, and set QueueManager.FullPath to iPathName and QueueManager.Identifier to iGuid.

    • Generate the Delete Directory Object ([MS-MQDSSM] section 3.1.6.2) event with the iDirectoryObject argument set to the newly created QueueManager ADM element instance.

    • If the preceding event does not return DirectoryOperationResult.Success, set rStatus to a failure HRESULT, and take no further action.

  • Else if iObjectType equals MQDS_SITE,

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

  • Else if iObjectType equals MQDS_CN:

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

  • Else if iObjectType equals MQDS_ENTERPRISE:

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

  • Else if iObjectType equals MQDS_USER:

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

  • Else if iObjectType equals MQDS_ROUTINGLINK:

    • Create a RoutingLink ADM element instance, and set RoutingLink.FullPath to iPathName and RoutingLink.Identifier to iGuid.

    • Generate the Delete Directory Object ([MS-MQDSSM] section 3.1.6.2) event with the iDirectoryObject argument set to the newly created RoutingLink ADM element instance.

    • If the preceding event does not return DirectoryOperationResult.Success, set rStatus to a failure HRESULT.

  • Set rStatus to 0x00000000.