NWDSGetServerName

Returns the name of the current server, as well as the number of partitions on the server, from 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)  NWDSGetServerName  ( 
     NWDSContextHandle   context,  
     pBuf_T              buf,  
     pnstr8              serverName,  
     pnuint32            partitionCount); 
  

Pascal

  uses netwin32 
   
  Function NWDSGetServerName 
    (context : NWDSContextHandle; 
     buf : pBuf_T; 
     serverName : pnstr8; 
     partitionCount : pnuint32 
  ) : NWDSCCODE;
  

Parameters

context

(IN) Specifies the NDS context for the request.

buf

(IN) Points to the result buffer being read.

serverName

(OUT) Points to the server name.

partitionCount

(OUT) Points to the number of partition names in the result buffer.

Return Values

0x0000 0000

SUCCESSFUL

nonzero value

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

Remarks

NWDSGetServerName should be the first function called to read from a result buffer returned by NWDSListPartitions.

The buf parameter points to a Buf_T filled by NWDSListPartitions.

The serverName parameter points to a memory location containing the distinguished name of the server for which replica information has been found. You must allocate space for the server 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.

For the complete steps for retrieving partition information, see Listing Partitions and Retrieving Partition Information.

NCP Calls

See Also

NWDSGetPartitionInfo, NWDSListPartitions