Open topic with navigation
|Example||Information Retrieval Functions|
Retrieves the name of the active server to which the client is connected.
int ctrx_get_server_name( LPSTR serverName, [CONTINUE_ON_ERROR,] CTRX_LAST );
|serverName||The output argument for the name of the server.|
|CTRX_LAST||A marker that indicates the end of the argument list.|
ctrx_get_server_name retrieves the name of the server to which the client is connected.
The script must allocate memory space for the output buffer, serverName, before ctrx_get_server_name is invoked. Release the memory when it is no longer in use.
When working with a secured Citrix environment, such as Citrix Access Gateway, this function can only retrieve the server name from the Citrix Agent. Therefore, the agent must be installed and active in order to retrieve a valid name.
Standard parameterization is not available for this function.
char buf; ctrx_get_server_name( buf, CTRX_LAST ); lr_output_message("current server name is %s", buf);