3.12.6.1 Get Queue Format Name from ADsPath

This event MUST be generated with the following arguments:

Return Values

  • rStatus: A status code that can be one of the following:

    • MQ_OK (0x00000000)

    • MQ_ERROR_QUEUE_NOT_FOUND (0xC00E0003L)

  • rFormatName: A format name that can be used to identify the queue, queue alias, or distribution list referenced by iADsPath.

  • If rStatus is not Success, the value of this parameter is undefined.

The Queue Manager MUST perform the following actions to process this event:

  • Set rStatus to MQ_OK (0x00000000).

  • If QueueManager.DirectoryOffline is True:

    • Set rStatus to MQ_ERROR_QUEUE_NOT_FOUND (0xC00E0003L) and take no further action.

  • Generate a Get Object Properties Using LDAP event ([MS-MQDSSM] section 3.1.6.14) with the following arguments:

    • iPath := iADsPath

    • iAttributes := a list consisting of one element, "objectClass"

  • If the rStatus returned by the Read Directory event is not DirectoryOperationResult.Success, set rStatus to MQ_ERROR_QUEUE_NOT_FOUND (0xC00E0003L) and take no further action.

  • Let ObjectClass be a string that is initialized to the value returned in rValues by the Get Object Properties Using LDAP event for the objectClass attribute. Let ObjectGuid be a GUID which is initialized to the value returned in rValues for the objectGuid attribute.

  • If ObjectClass is "mSMQQueue", then:

    • Set rFormatName to a string formed by concatenating "PUBLIC=" and the string representation of the GUID in ObjectGuid.

    • Set rStatus to MQ_OK and take no further action.

  • If ObjectClass is "msMQ-Custom-Recipient", then:

    • Generate a Get Object Properties Using LDAP event ([MS-MQDSSM] section 3.1.6.14) with the following arguments:

      • iPath := iADsPath

      • iAttributes := a list consisting of one element, "msMQ-Recipient-FormatName"

    • If the rStatus returned by the Read Directory event is not DirectoryOperationResult.Success, set rStatus to MQ_ERROR_QUEUE_NOT_FOUND (0xC00E0003L) and take no further action.

    • Set rFormatName to the value returned in rValues by the Get Object Properties Using LDAP event for the msMQ-Recipient-FormatName attribute.

    • Set rStatus to MQ_OK and take no further action.

  • If ObjectClass is "group", then:

    • Set rFormatName to a string formed by concatenating "DL=" and the string representation of the GUID in ObjectGuid.

    • Set rStatus to MQ_OK and take no further action.

  • Set rStatus to MQ_ERROR_QUEUE_NOT_FOUND (0xC00E0003L) and take no further action.