NWDSPutChangeAndVal

Stores a change record and attribute value in a request buffer to be used by NWDSModifyObject.

Local Servers:nonblocking
Remote Servers:nonblocking
NetWare Server:4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98, Windows 2000, Windows XP
Library:Cross-Platform NDS (NET*.*)
Service:NDS

Syntax

C

  #include <nwnet.h> 
  or 
  #include <nwdsbuft.h> 
   
  N_EXTERN_LIBRARY (NWDSCCODE)  NWDSPutChangeAndVal  ( 
     NWDSContextHandle   context,  
     pBuf_T              buf,  
     nuint32             changeType,  
     pnstr8              attrName,  
     nuint32             syntaxID,  
     nptr                attrVal);
  

Pascal

  uses netwin32 
   
  Function NWDSPutChangeAndVal  ( 
     context : NWDSContextHandle; 
     buf : pBuf_T; 
     changeType : nuint32; 
     attrName : pnstr8; 
     syntaxID : nuint32; 
     attrVal : nptr 
  ) : NWDSCCODE;
  

Parameters

context

(IN) Specifies the NDS context for the request.

buf

(IN) Points to the request buffer where the request will be stored.

changeType

(IN) Specifies the modification type to be performed (see Section 5.5, Change Types for Modifying Objects).

attrName

(IN) Points to the attribute name to be changed.

syntaxID

(IN) Specifies the data type of the attribute value.

attrVal

(IN) Points to the attribute value to be stored in the request buffer.

Return Values

0x0000 0000

SUCCESSFUL

nonzero value

Nonzero values indicate errors. See NDS Return Values (–001 to –799).

Remarks

NWDSPutChangeAndVal combines the functionality of NWDSPutChange and NWDSPutAttrVal and adds error checking so the buffer is always valid.

NWDSPutChangeAndVal checks the return values of NWDSPutChange and NWDSPutAttrVal. If either function fails because the buffer was too small, NWDSPutChangeAndVal will not modify the buffer. Call NWDSModifyObject to modify the eDirectory object.

A change record includes the name of the attribute and the type of change to be performed.

If an attempt is made to modify the Object Class attribute, an error is returned.

A value can be modified by placing a combination of DS_REMOVE_VALUE and DS_ADD_VALUE change records in the same request buffer. This allows the operations to be completed with a single call to NWDSModifyObject.

The buf parameter points to a Buf_T, which is allocated by NWDSAllocBuf and initialized by NWDSInitBuf.

The syntaxID parameter tells NWDSPutAttrVal what method to use for converting the attribute value to a machine-transparent form when storing the value in the buffer. Syntax IDs (such as SYN_PATH) are enumerated in NWDSDEFS.H. Syntaxes are described in Attribute Syntax Definitions (NDK: Novell eDirectory Schema Reference).

The attrVal parameter points to the attribute value to be stored in the request buffer. The type of data pointed to by attrVal depends on the indicated attribute syntax. See Attribute Syntax Definitions to determine the data type associated with an attribute.

NCP Calls

See Also

NWDSPutAttrVal, NWDSPutChange, NWDSModifyObject