Retrieves information about eDirectory schema object class definitions.
#include <nwnet.h> or #include <nwdssch.h> N_EXTERN_LIBRARY (NWDSCCODE) NWDSReadClassDef ( NWDSContextHandle context, nuint32 infoType, nbool8 allClasses, pBuf_T classNames, pnint_ptr iterationHandle, pBuf_T classDefs);
uses netwin32 Function NWDSReadClassDef (context : NWDSContextHandle; infoType : nuint32; allClasses : nbool8; classNames : pBuf_T; iterationHandle : pnint_ptr; classDefs : pBuf_T ) : NWDSCCODE;
(IN) Specifies the NDS context for the request.
(IN) Specifies the information type desired (see Section 5.15, Information Types for Class Definitions).
(IN) Specifies whether information for every object class should be returned: TRUE=all classes; FALSE=only the classes specified in classNames are requested.
(IN) Points to a request buffer containing the names of the object classes whose information is to be returned.
(IN/OUT) Points to information needed to resume subsequent iterations of NWDSReadClassDef.
(OUT) Points to a result buffer containing the requested information.
These are common return values.
0x0000 0000 |
SUCCESSFUL |
0x8996 |
SERVER_OUT_OF_MEMORY |
0x89E2 |
TOO_FEW_FRAGMENTS |
0x89E3 |
TOO_MANY_FRAGMENTS |
0x89E4 |
PROTOCOL_VIOLATION |
0x89E5 |
SIZE_LIMIT_EXCEEDED |
0x89FD |
UNKNOWN_REQUEST |
0x89FD |
INVALID_PACKET_LENGTH |
0x89FE |
BAD_PACKET |
0x89FF |
Failure not related to eDirectory |
nonzero value |
Nonzero values indicate errors. See |
The infoType, allClasses, and classNames parameter indicate the type of object class information requested.
If allClasses is TRUE, information about all classes in the eDirectory schema is requested and classNames is ignored and can be set to NULL. If allClasses is FALSE, only the class definitions specified in the request buffer pointed to by classNames are requested.
The iterationHandle parameter controls retrieval of results larger than the result buffer pointed to by classDefs.
Before the initial call to NWDSReadClassDef, set the contents of the iteration handle pointed to by iterationHandle to NO_MORE_ITERATIONS.
If the result buffer holds the complete results when NWDSReadClassDef returns from its initial call, the location pointed by iterationHandle is set to NO_MORE_ITERATIONS. If the iteration handle is not set to NO_MORE_ITERATIONS, use the iteration handle for subsequent calls to NWDSReadClassDef to obtain further portions of the results. When the results are completely retrieved, the contents of the iteration handle will be set to NO_MORE_ITERATIONS.
NOTE:To end the Read operation before the complete results have been retrieved, call NWDSCloseIteration with a value of DSV_READ_CLASS_DEF to free memory and states associated with NWDSReadClassDef.
The level of granularity for partial results is an individual class definition. If the buffer is not large enough to hold an entire class definition, ERR_INSUFFICIENT_BUFFER will be returned.
The classDefs parameter points to a result buffer containing the requested information. This buffer contains either a list of class names, or a sequence of class names and definitions, or a sequence of class definitions. The type of information returned depends on infoType.
For step by step instructions, see Reading a Class Definition.