DialGetServerIP

DialGetServerIP is a built-in scripting function that gets the IP address of a Remote Access Service (RAS) server station.

Group Execution Windows Embedded Thin Client Mobile Access
Dial-up Synchronous Supported (see Notes) Not Supported Supported Not supported

Syntax

Web Studio Help tion dialup dialgetserverip.xml d101979e95 DialGetServerIP
numType
The type of information specified by strPhoneBookOrModem: 0 is a Phonebook Name, 1 is a Modem Name, and 2 is a Direct Connection Name.
strPhoneBookOrModem
The Phonebook Name, Modem Name, or Direct Connection Name used to make the connection.
tagServerIP
The name of a String tag that will receive the IP address.
Note: The tag name should be enclosed in quotes, as shown in the syntax diagram, or else the function will try to use the value of the tag.
optTagRefresh
The name of a tag that, whenever the value of the tag changes, will trigger the function to refresh its returned value.

Also, this parameter is optional but you must include it when you configure the function on an object animation such as Text Data Link or Position.

Returned value

This function returns the following possible values:
Value Description
-5 DialGetServerIP was not found in IndRAS.dll.
-4 Invalid type; check numType.
-3 Incorrect number of parameters.
-2 DialStatus was not found in IndRAS.dll.
-1 IndRAS.dll was not loaded.
n Status code returned by DialStatus.

This is the value returned by the function itself. The IP address is written to the tag specified by tagServerIP.

Notes

This function must be executed on the RAS client station, not on the server station. (Essentially, the station gets the IP address of the server to which it is connected.)

Also, this function is not supported on Windows 7.

Examples

Use the Phonebook Name “Office DialUp” and write the resulting IP address to ServerIPTag:
  DialGetServerIP( 0, "Office DialUp", "ServerIPTag" )  
Use the Modem Name “USRobotics_SportsterFaxModem,” write the resulting IP address to ServerIPAddress, and refresh every second (that is, every time the system tag Second changes):
  DialGetServerIP( 1, "USRobotics_SportsterFaxModem", "ServerIPAddress", Second )  
Use the Direct Connection Name “DirectDial” and write the resulting IP address to IPAdd:
  DialGetServerIP( 2, "DirectDial", "IPAdd" )  

DialGetServerIP