NWDSGetObjectName

Returns the name and information about the next object whose information is stored in a result buffer.

NetWare Server:4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98, Windows 2000, Windows XP
Library:Cross-Platform NDS (NET*.*)
Service:NDS

Syntax

C

  #include <nwnet.h> 
  or 
  #include <nwdsbuft.h> 
   
  N_EXTERN_LIBRARY (NWDSCCODE)  NWDSGetObjectName  ( 
     NWDSContextHandle   context,  
     pBuf_T              buf,  
     pnstr8              objectName,  
     pnuint32            attrCount,  
     pObject_Info_T      objectInfo); 
  

Pascal

  uses netwin32 
   
  Function NWDSGetObjectName 
    (context : NWDSContextHandle; 
     buf : pBuf_T; 
     objectName : pnstr8; 
     attrCount : pnuint32; 
     objectInfo : pObject_Info_T 
  ) : NWDSCCODE;
  

Parameters

context

(IN) Specifies the NDS context for the request.

buf

(IN) Points to the result buffer being read.

objectName

(OUT) Points to the name of the object whose information is at the current position in the buffer.

attrCount

(OUT) Points to the number of attributes following the object name.

objectInfo

(OUT) Points to additional information about the object (size of Object_Info_T).

Return Values

0x0000 0000

SUCCESSFUL

nonzero value

Nonzero values indicate errors. See NDS Return Values (–001 to –799).

Remarks

NWDSGetObjectName 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 NWDSGetObjectCount.

Use the NWDSGetObjectName function when the context handle has the default values for the DCK_DSI_FLAGS. If you have changed the requested DSI information, use the NWDSGetObjectNameAndInfo 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 NWDSGetObjectName for the next object.

The buf parameter points to a Buf_T filled in by NWDSList, NWDSRead, or NWDSSearch.

The objectName parameter points to the name of the current object in the buffer. The object’s name 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’s 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 attrCount parameter points to the number of attributes that follow the object name. The attribute count is always zero for a buffer returned by NWDSList since NWDSList returns only the names of objects. The attribute count will be zero or greater for a buffer returned by NWDSSearch.

The objectInfo parameter points to additional information about the object. You must allocate memory to retrieve this information (sizeof(Object_Info_T)).

For more information, see NWDSList, NWDSRead, or NWDSSearch.

NCP Calls

See Also

NWDSGetAttrName, NWDSGetAttrVal, NWDSGetObjectCount, NWDSList, NWDSRead, NWDSSearch