This function returns information for all connected servers - one server per call. The order is determined by the value of the lSeq argument.

C format

PIINT32 pilg_getconnectedserver(

LPSTR lpszServerNameBuf,

int32 PIPTR * plBufSize,

int32 PIPTR * plNodeId,

int32 PIPTR * plPort,

int32 lSeq );



System error


End of the connected server list has been reached




GETNEXT was requested without GETFIRST being issued or GETNEXT was called after a previous return of ERR_NO_MORE (1)


Application is not registered


No servers configured (pilogin.ini not found)


lpszServerNameBuf (returned)

Server name - pointer to null terminated string.

plBufsize (passed, returned)

Pointer to the length of the server name buffer - on input it contains the length of the lpszServerNameBuf, on exit it contains the actual length of the server name

plNodeId ( returned)

Pointer to the node id of the server

plPort ( returned)

Pointer to the port number used by the server

lSeq ( passed)

Sequence indicator - GETFIRST (0), GETNEXT(1).

Usage Notes

If in between calls to pilg_getconnectedserver the status of the currently connected servers changes, the next call to the function will return -1.

Enabling Operational Intelligence