3.1.6.4 Update Directory Object

This event MUST be generated with the following arguments:

  • iObjectType: One of the directory object types, as defined in section 2.2.8.

  • iPathName: The directory service pathname of the object to be updated, as defined in section 2.2.9, or NULL.

  • iGuidIdentifier: The GUID of the object to update, if iPathName is NULL. Not used if iPathName is not NULL, and can be GUID_NULL in that case.

  • iNumberOfProperties: The size (in elements) of the arrays iPropertyID and iPropertyValue. The arrays iPropertyID and iPropertyValue MUST have an identical number of elements.

  • iPropertyID: An array of property identifiers of properties to associate with the object identified by iPathName or iGuidIdentifier. Each element MUST specify a value from the property identifiers table, as specified in section 2.2.10.1, for the directory object type specified in iObjectType. Each element MUST specify the property identifier for the corresponding property value at the same element index in iPropertyValue.

  • iPropertyValue: An array of property values in PROPVARIANT structures to associate with the object. Each element MUST specify the property value for the corresponding property identifier at the same element index in iPropertyID.

  • iPartitionID: A DirectoryPartitionIdentifier (section 3.1.1.1).

  • iSeqNumber: A DirectorySequenceNumber (section 2.2.23).

  • iReplicate: A Boolean value indicating whether replication of this change is needed. TRUE if replication is required, or FALSE if it is not.

Return Value:

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

The server MUST perform the following actions to process this event:

  • Verify that for each property identifier in iPropertyID, the property identifier is valid for the object type specified in iObjectType, and that the corresponding variant in iPropertyValue is of the type defined for the property identifier, as specified in the tables in section 2.2.10.1.

  • Ignore any property identifier that is not valid for the object type specified in iObjectType.

  • Let dirObject be a directory object and initialized to NULL.

  • Generate the Get Directory Object for Update (section 3.1.6.14) event with the following arguments:

    • iObjectType := iObjectType

    • iPathName := iPathName

    • iGuid := iGuidIdentifier

  • If rStatus returned by the event is not 0x00000000, return rStatus and take no further action; otherwise, set dirObject to the returned rObject.

  • Map the values contained in aProp and apVar to dirObject attributes according to the rules specified in the following table. If iObjectType is not in the table, set rStatus to an error, and take no further action. Invalid property identifiers and the corresponding property values are ignored.

    Value of iObjectType

    Rules

    MQDS_QUEUE

    As defined in section 3.1.4.21.8.2.4 with the following changes:

    • dirObject.SequenceNumber is set from  iSeqNumber.

    MQDS_MACHINE

    As defined in section 3.1.4.21.8.2.1 with the following changes:

    • dirObject.SequenceNumber is set from iSeqNumber.

    MQDS_SITE

    As defined in section 3.1.4.21.8.2.8 with the following changes:

    • dirObject.SequenceNumber is set from iSeqNumber.

    MQDS_ENTERPRISE

    As defined in section 3.1.4.21.8.2.6 with the following changes:

    • dirObject.SequenceNumber is set from iSeqNumber.

    MQDS_ROUTINGLINK

    As defined in section 3.1.4.21.8.2.9 with the following changes:

    • dirObject.SequenceNumber is set from iSeqNumber.

    This event MAY<128> support additional object types defined in the following table:

    Value of  iObjectType

    Rules

    MQDS_CN

    As defined in section 3.1.4.21.8.2.10 with the following changes:

    • dirObject.SequenceNumber is set from iSeqNumber.

    MQDS_USER

    As defined in section 3.1.4.21.8.2.12 with the following changes:

    • dirObject.SequenceNumber is set from iSeqNumber.

  • Update the attributes of dirObject using the mapping from the preceding step. For each updated attribute, add the ADM element attribute name to a list, referred to as attrList.

  • Generate the Commit Directory Object Update (section 3.1.6.15) event with the arguments set to dirObject and attrList respectively. If the event returns DirectoryOperationResult.Success, set rStatus to 0x00000000; otherwise, set rStatus to a failure HRESULT, and take no further action.

  • If iReplicate is TRUE, the server MAY<129> contact other servers to propagate the changes.