NWDSGetAttrDef(3nw)


NWDSGetAttrDef -- returns the next Directory Schema attribute definition from a result buffer

Synopsis

   #include <nwnet.h> 
   or 
   #include <nwdsbuft.h> 
   

NWDSCCODE N_API NWDSGetAttrDef (NWDSContextHandle context, pBuf_T buf, pnstr8 attrName, pAttr_Info_T attrInfo);

Description

The parameters are as follows:

context
(IN) Specifies the Directory context for the request.

buf
(IN) Points to the result buffer being read.

attrName
(OUT) Points to the name of the attribute definition at the current position in the result buffer.

attrInfo
(OUT) Points to additional information about the attribute definition.

Return values

0x0000
SUCCESSFUL

Negative Value
Negative values indicate errors. For errors returned by Directory Services, see ``Directory Services OS Errors'' (-001 to -255), ``Directory Services Client Library Errors'' (-301 to -399), or ``Directory Services Agent in the Server Errors'' (-601 to -699).

Notices

NWDSGetAttrDef is used to retrieve attribute information from a result buffer filled in by NWDSReadAttrDef. The steps for removing the information from a result buffer are as follows:

  1. Determine the number of attribute definitions in the result buffer by calling NWDSGetAttrCount.

  2. For each attribute definition in the result buffer, retrieve the attribute'[s information from the buffer by calling NWDSGetAttrDef.

The complete steps for reading the definitions of an object's attributes are listed in the reference for NWDSReadAttrDef.

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

If NWDSReadAttrDef is called with infoType set to DS_ATTR_DEF_NAMES (instead of DS_ATTR_DEFS), its output buffer will contain only names of the attributes. In this case, NWDSGetAttrDef ignores attrInfo, so attrInfo can be NULL.

You must allocate memory (sizeof(Attr_Info_T)) to receive the additional attribute-definition information.

Services

Directory

NCP calls

None

References

NWDSGetAttrCount(3nw), NWDSReadAttrDef(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.