CitrixSetClientName Function

Action

When a Citrix client connects to a MetaFrame server it uses a name to identify itself. This name is automatically generated during replay. The name looks like “SP_User_x,” where x numerates the virtual users. Call this function when a custom name is to be used.

Include file

CitrixAPI.bdh

Syntax

CitrixSetClientName( in sClientName : string ) : boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
sClientName Custom client name.

Example:

  transaction TMain
  var
  begin
    CitrixInit(640, 480);
    CitrixSetClientName("MyClient");
    CitrixSetApplication("Excel");
    CitrixConnect("myserver", "myusername", "mypass", "mydomain", COLOR_16bit);
    CitrixWaitForLogon();
    hWnd4 := CitrixWaitForWindowCreation("Microsoft Excel – Book*", MATCH_Wildcard, 0x15CF0000, -4, -4, 648, 488);
    CitrixMouseClick(636, 14, hWnd4, MOUSE_ButtonLeft);
    CitrixWaitForWindow(hWnd4, EVENT_Destroy);
    ThinkTime(2.63);
    CitrixDisconnect();
  end TMain;