Returns the name of the current server, as well as the number of partitions on the server, from a result buffer.
#include <nwnet.h> or #include <nwdsbuft.h> N_EXTERN_LIBRARY (NWDSCCODE) NWDSGetServerName ( NWDSContextHandle context, pBuf_T buf, pnstr8 serverName, pnuint32 partitionCount);
uses netwin32 Function NWDSGetServerName (context : NWDSContextHandle; buf : pBuf_T; serverName : pnstr8; partitionCount : pnuint32 ) : NWDSCCODE;
(IN) Specifies the NDS context for the request.
(IN) Points to the result buffer being read.
(OUT) Points to the server name.
(OUT) Points to the number of partition names in the result buffer.
0x0000 0000 |
SUCCESSFUL |
nonzero value |
Nonzero values indicate errors. See |
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.