NWDSGetAttrVal

Returns the next attribute value in a result buffer.

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)  NWDSGetAttrVal 
    (NWDSContextHandle   context,  
     pBuf_T              buf,  
     nuint32             syntaxID,  
     nptr                attrVal); 
  

Pascal

  uses netwin32 
   
  Function NWDSGetAttrVal 
    (context : NWDSContextHandle; 
     buf : pBuf_T; 
     syntaxID : nuint32; 
     attrVal : nptr 
  ) : NWDSCCODE;
  

Parameters

context

(IN) Specifies the NDS context for the request.

buf

(IN) Points to the result buffer being read.

syntaxID

(IN) Specifies the syntax of the attribute value.

attrVal

(OUT) Points to the attribute value at the current buffer position.

Return Values

0x0000 0000

SUCCESSFUL

nonzero value

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

Remarks

NWDSGetAttrVal is used to retrieve attribute values from a result buffer filled in by functions such as NWDSList, NWDSRead, or NWDSSearch.

The syntaxID parameter is returned by a previous call to NWDSGetAttrName. The syntaxID parameter indicates to NWDSGetAttrVal how to translate the attribute value into a data structure. The structure of the data returned in attrVal depends on the value of syntaxID.

The syntax types (such as SYN_CI_STRING) are enumerated in NWDSDEFS.H. Attribute syntaxes and their corresponding data structures are listed in Attribute Syntax Definitions (NDK: Novell eDirectory Schema Reference).

If the attrVal parameter equals NULL, the value is skipped; this is useful for simply counting attribute values.

You must allocate memory for the attribute value and set attrVal to point to that memory. The memory must be a contiguous block of memory whose size is determined by calling NWDSComputeAttrValSize.

The memory pointed to by attrVal should be dynamically allocated memory since the size of the memory needed to store the attribute values can be different even when the values are associated with the same attribute.

For complete steps on reading the information from the buffer, see Reading Attributes of eDirectory Objects

NCP Calls