WebGetLocalAddress Function

Action

Returns the local IP address that is used by the calling virtual user. If the Client IP address multiplexing option in the Internet category of the profile settings is checked, this function can be used to retrieve the randomly assigned IP address.

Include file

WebAPI.bdh

Syntax

WebGetLocalAddress( out sIPAddress  : string,
                    in  nAddressLen : number optional ): boolean;

Return value

  • true if the function succeeds

  • false otherwise

Parameter Description
sIPAddress String variable that receives the IP address.
nAddressLen Maximum length of the IP address to return (optional).

Example

dcltrans 
  transaction TMain 
  var
    sAddress: string; 
  begin 
    WebGetLocalAddress(sAddress); 
    write("IP address = "); writeln(sAddress); 
  end TMain;