Returns the number of attributes whose information is stored in a result buffer.
#include <nwnet.h> or #include <nwdsbuft.h> N_EXTERN_LIBRARY (NWDSCCODE) NWDSGetAttrCount ( NWDSContextHandle context, pBuf_T buf, pnuint32 attrCount);
uses netwin32 Function NWDSGetAttrCount (context : NWDSContextHandle; buf : pBuf_T; attrCount : pnuint32 ) : NWDSCCODE;
(IN) Specifies the NDS context for the request.
(IN) Points to the result buffer being read.
(OUT) Points to the number of attributes in the result buffer.
0x0000 0000 |
SUCCESSFUL |
nonzero value |
Nonzero values indicate errors. See |
NWDSGetAttrCount should be the first "Get" operation performed following a Read operation (such as NWDSRead, NWDSReadAttrDef, or NWDSSearch).
After the attribute count has been determined, the attribute names can be retrieved from the buffer by calling NWDSGetAttrName or NWDSGetAttrDef. Attribute values are retrieved using a combination of calls to NWDSComputeAttrValSize and NWDSGetAttrVal.
The buf parameter points to a Buf_T filled in by a previous call to a eDirectory function, such as NWDSRead.
For complete steps on reading the information from the buffer, see Reading Attributes of eDirectory Objects.