NWDSGetAttrName

Retrieves the name of the attribute whose information is stored at the current position 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)  NWDSGetAttrName  ( 
     NWDSContextHandle   context,  
     pBuf_T              buf,  
     pnstr8              attrName,  
     pnuint32            attrValCount,  
     pnuint32            syntaxID); 
  

Pascal

  uses netwin32 
   
  Function NWDSGetAttrName 
    (context : NWDSContextHandle; 
     buf : pBuf_T; 
     attrName : pnstr8; 
     attrValCount : pnuint32; 
     syntaxID : pnuint32 
  ) : NWDSCCODE;
  

Parameters

context

(IN) Specifies the NDS context for the request.

buf

(IN) Points to the result buffer being read.

attrName

(OUT) Points to the attribute name whose information is stored at the current position in the result buffer.

attrValCount

(OUT) Points to the number of attribute values following the attribute name in the result buffer. (Multivalued attributes can have more than one value.)

syntaxID

(OUT) Points to the syntax ID identifying the syntax type of the attribute returned in attrName.

Return Values

0x0000 0000

SUCCESSFUL

0xFFFF FEB5

ERR_NULL_POINTER

nonzero value

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

Remarks

NWDSGetAttrName is used to retrieve attribute information from a result buffer filled in by NWDSRead, NWDSSearch, or NWDSList.

You must allocate space for the attribute name. The size of the allocated memory is ((MAX_SCHEMA_NAME_CHARS)+1)*sizeof(character size) where character size is 1 for single-byte characters, and 2 for Unicode characters (Unicode characters are always 16 bits). One character is used for NULL termination.

The location pointed to by attrValCount is set to specify the number of attribute values associated with the current attribute in the result buffer. If no values are associated with the current attribute, the number will be zero. If the current attribute is a single-valued attribute, the number will be one. If the current attribute is a multi-valued attribute, the number can be zero or more.

The location pointed to by syntaxID receives a value identifying the syntax type of the attribute returned in attrName. This ID is passed as a parameter to subsequent calls to NWDSComputeAttrValSize and NWDSGetAttrVal. The syntax types (such as SYN_CI_STRING) are enumerated in NWDSDEFS.H.

If the function filling in the result buffer was called specifying that the results contain only names, NWDSGetAttrName still needs valid pointers for the attrValCount and syntaxID parameters, or the function returns ERR_NULL_POINTER.

For more information, see Reading Attributes of eDirectory Objects.

NCP Calls

See Also

NWDSGetAttrCount, NWDSRead, NWDSSearch, NWDSReadAttrDef