Modifies an object or its alias.
#include <nwnet.h> or #include <nwdsdsa.h> N_EXTERN_LIBRARY (NWDSCCODE) NWDSModifyObject ( NWDSContextHandle context, pnstr8 objectName, pnint_ptr iterationHandle, nbool8 more, pBuf_T changes);
uses netwin32 Function NWDSModifyObject (context : NWDSContextHandle; objectName : pnstr8; iterationHandle : pnint_ptr; more : nbool8; changes : pBuf_T ) : NWDSCCODE;
(IN) Specifies the NDS context for the request.
(IN) Points to the object to be modified.
(IN) Points to the iteration number (set initially to -1).
(IN) Specifies whether additional information will be returned:
(IN) Points to the set of changes to be applied to the object.
These are common return values.
0x0000 0000 |
SUCCESSFUL |
0x8996 |
SERVER_OUT_OF_MEMORY |
0x89E2 |
TOO_FEW_FRAGMENTS |
0x89E3 |
TOO_MANY_FRAGMENTS |
0x89E4 |
PROTOCOL_VIOLATION |
0x89E5 |
SIZE_LIMIT_EXCEEDED |
0x89FD |
UNKNOWN_REQUEST |
0x89FD |
INVALID_PACKET_LENGTH |
0x89FE |
BAD_PACKET |
0x89FF |
Failure not related to eDirectory |
nonzero value |
Nonzero values indicate errors. See |
NWDSModifyObject cannot modify an object’s RDN. It can perform only the following:
Add a new attribute
Remove an attribute
Add values to an attribute
Remove values from an attribute
Replace the values of an attribute
The objectName parameter identifies the object to be modified. The object can be an alias. Any aliases in the name are not dereferenced.
The changes parameter defines a sequence of modifications, which are applied in the order specified. The buffer is allocated by calling NWDSAllocBuf and initialized for DSV_MODIFY_ENTRY by calling NWDSInitBuf. The specified changes are inserted into the buffer by calling NWDSPutChange and NWDSPutAttrVal, or NWDSPutChangeandVal.
NOTE:If the iterationHandle parameter is set to 0 initially, NWDSModifyObject will ignore the value and process the request as if -1 was passed.
You can set up multiple buffers to hold changes to an object and have them processed as one modification. To do this, set the more parameter to a nonzero value. This informs eDirectory that you have multiple changes for the same object. When you send the last buffer of information for the object with NWDSModifyObject, set the more parameter to zero. This signals eDirectory to begin processing all the changes for the object.
If the NDS/eDirectory version does not support this iterative process, ERR_BUFFER_FULL will be returned and you will need to send each change as a separate modification with the more parameter set to zero.
If any of the individual modifications fail, an error is generated and the object is left in the state it was prior to the operation. Furthermore, the end result of the sequence of modifications may not violate the eDirectory schema. (However, it is possible, and sometimes necessary, for the individual object modification changes to appear to do so.) If an attempt is made to modify the object class attribute, an error is returned.
Aliases are never dereferenced by NWDSModifyObject. The setting of the context flag associated with DCV_DEREF_ALIASES is not relevant to NWDSModifyObject and is ignored.
NWDSModifyDN, NWDSRemoveObject, NWDSModifyRDN, NWDSMutateObject