5.151 PerformAddOperation

 procedure PerformAddOperation(
   data: ENTINF, 
   var newObjectName: DSName,   
   prefixTable: PrefixTable,
   boolean: fAsOriginating): integer

The PerformAddOperation procedure performs an add operation with the given ENTINF to create a new object in the directory. For more details, see [MS-ADTS] section 3.1.1.5.2.

The resulting object has the DSNAME data.pName.

For each ATTR attr in data.AttrBlock, let attribute be the ATTRTYP returned by LocalAttidFromRemoteAttid(prefixTable, attr.attrType). Then the object created by PerformAddOperation has an attribute whose ATTRTYP is attribute and that has the values attr.AttrVal.pAVal[0... attr.AttrVal.valCount].

If data.ulFlags ∩ {ENTINF_DYNAMIC_OBJECT} = {ENTINF_DYNAMIC_OBJECT}, the resulting object is created as a dynamic object.

If fAsOriginating is true, then add the object as an originating update. See [MS-ADTS] section 3.1.1.1.9.

If the add operation succeeds, the DSName of the created object is returned in newObjectName and the procedure returns 0. If the add operation fails, the procedure returns a Windows error code.