Returns the name and information about the next object whose information is stored in a result buffer.
#include <nwnet.h> or #include <nwdsbuft.h> N_EXTERN_LIBRARY (NWDSCCODE) NWDSGetObjectNameAndInfo ( NWDSContextHandle context, pBuf_T buf, pnstr8 objectName, pnuint32 attrCount, ppnstr8 objectInfo);
uses netwin32 Function NWDSGetObjectNameAndInfo ( context : NWDSContextHandle; buf : pBuf_T; objectName : pnstr8; attrCount : pnuint32; objectInfo : ppnstr8 ) : NWDSCCODE;
(IN) Specifies the NDS context for the request.
(IN) Points to the result buffer of a previous operation.
(OUT) Points to the name of the object whose information is at the current position in the buffer.
(OUT) Points to the number of attributes following the object name.
(OUT) Points to additional information about the object.
0x0000 0000 |
SUCCESSFUL |
nonzero value |
Nonzero values indicate errors. See |
NWDSGetObjectNameAndInfo should be called once for each object in the buffer. The count of objects whose information is stored in the buffer is determined by calling the NWDSGetObjectCount function.
Use the NWDSGetObjectNameAndInfo function when you have defined the return values for the DCK_DSI_FLAGS in the context handle. If you are using default values, use the NWDSGetObjectName function to retrieve the information. For more information, see DCK_DSI_FLAGS Key
NOTE:You must retrieve all of the information about the current object before calling NWDSGetObjectNameAndInfo for the next object.
The buf parameter points to a Buf_T filled in by the NWDSList, NWDSRead, NWDSReadObjectDSIInfo, or NWDSSearch functions.
The object name in the objectName parameter is abbreviated if the context flag associated with DCV_CANONICALIZE_NAMES is set. Types are removed from the name if the flag associated with DCV_TYPELESS_NAMES is set.
You must allocate space for the object name. The size of the allocated memory is ((MAX_DN_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 attribute count in the attrCount parameter is always zero for a buffer returned by the NWDSList function since the NWDSList function returns only object information and not attribute information. The attribute count will be zero or greater for a buffer returned by the NWDSSearch or NWDSRead functions.
You must allocate memory to retrieve the information in the objectInfo parameter. Use the NWDSGetDSIInfo function to read the information in the buffer pointed to by objectInfo. Use this pointer as the buf parameter for the NWDSGetDSIInfo function.
For more information, see the NWDSList, NWDSRead, and NWDSSearch functions.