Distributed Tuning Interface Reference : PvGetServerName()
 
PvGetServerName()
Retrieves the name of the connected server indicated by the connection handle.
Header File: connect.h (See also Header Files)
Function First Available In Library: w3dbav75.dll (Windows), libpsqldti.so (Linux), libpsqldti.dylib (macOS) (See also Link Libraries)
Syntax
BTI_SINT PvGetServerName(
   BTI_LONG           hConnection,
   BTI_ULONG_PTR      pBufSize,
   BTI_CHAR_PTR       serverName);
Arguments
 
In
hConnection
Connection handle that identifies the server. Connection handles are obtained with the PvConnectServer() function.
In/Out
pBufSize
Address of an unsigned long containing size of the buffer allocated to receive server name.
In/Out
serverName
Returned server name if successful, empty string otherwise.
Return Values
 
P_OK
The operation was successful.
P_E_INVALID_HANDLE
Invalid connection handle.
P_E_NULL_PTR
Call with NULL pointer.
P_E_BUFFER_TOO_SMALL
The buffer is too small for the string. In this case, the required buffer size is returned in PBufSize.
P_E_FAIL
Failed to connect to the named server.
Remarks
The implementation should perform the necessary initializations when called the first time.
Multiple simultaneous connections are allowed.
See Also
PvStart()
PvConnectServer()
PvDisconnect()
PvStop()