Returns the name of the next object class item stored in a result buffer.
#include <nwnet.h> or #include <nwdsbuft.h> N_EXTERN_LIBRARY (NWDSCCODE) NWDSGetClassItem ( (NWDSContextHandle context, pBuf_T buf, pnstr8 itemName);
uses netwin32 Function NWDSGetClassItem (context : NWDSContextHandle; buf : pBuf_T; itemName : pnstr8 ) : NWDSCCODE;
(IN) Specifies the NDS context for the request.
(IN) Points to the result buffer being read.
(OUT) Points to the name of the item (attribute or class) at the current position in the result buffer.
0x0000 0000 |
SUCCESSFUL |
nonzero value |
Nonzero values indicate errors. See |
The buf parameter points to a Buf_T filled in by NWDSReadClassDef.
The itemName parameter points to the name of either an attribute or a class. The item is a member of one of the five class-definition-item lists:
Super Class Names
Containment Class Names
Naming Attribute Names
Mandatory Attribute Names
Optional Attribute Names
The first two lists contain the names of classes. The remaining lists contain the names of attributes.
The user must allocate space for the class item name pointed to by itemName. 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.
Before retrieving the class items from a class-definition-item list, determine the number of items in the list by calling NWDSGetClassItemCount. Then retrieve the items associated with the list by repeatedly calling NWDSGetClassItem once for each item in the list. Then determine the number of items in the next list by calling NWDSGetClassItemCount, and retrieve the values for the list by calling NWDSGetClassItem, and so on until you have retrieved all of the information from all of the lists.
NOTE:You must retrieve the information from the class-definition-item lists in the order shown above.
For the complete steps on reading class-definition information, see Reading a Class Definition.