Please enable JavaScript to view this site.

thinBasic Help Manual

Navigation: ThinBASIC Modules > OnLineScores

OnlineScores_GetConnectionState

Scroll Prev Top Next More

* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *

This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.

This version is copyright and may only be used for local testing purposes. It may not be distributed.

Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.

 

This functionality is no longer supported.

 

Description

 

Retrieves the connected state of the local system.

 

Syntax

 

iFlag = OnlineScores_GetConnectionState()

 

Returns

 

Number.

Returns %FALSE if there is no Internet connection, or if all possible Internet connections are not currently active.

Returns a value different from %FALSE if there is an active modem or a LAN Internet connection.

See remarks.

 

Parameters

 

Name

Type

Optional

Meaning





 

Remarks

 

A positive return value indicates that at least one connection to the Internet is available. It does not guarantee that a connection to a specific host can be established.

 

A positive return value indicates that either the modem connection is active, or a LAN connection is active and a proxy is properly configured for the LAN.

A return value of %FALSE indicates that neither the modem nor the LAN is connected.

 

A positive return value contains one or more of the following flags set:

%INTERNET_CONNECTION_MODEM

%INTERNET_CONNECTION_LAN

%INTERNET_CONNECTION_PROXY

%INTERNET_CONNECTION_MODEM_BUSY

%INTERNET_RAS_INSTALLED

%INTERNET_CONNECTION_OFFLINE

%INTERNET_CONNECTION_CONFIGURED

 

Use AND to check for active options.

 

Restrictions

 

See also

 

Examples

 

Dim lConFlags   As Long

 

PRINTL "OnLineScores module needs to connect to Internet. Checking connection ..."

lConFlags = OnlineScores_GetConnectionState

If lConFlags = %False Then

  PRINTL "... it seems you are not connected to Internet"

  PRINTL "Press a key to end script"

  WAITKEY

  STOP

Else

  PRINTL "... your public IP is:", OnlineScores_GetTestingData(%OLS_Test_PublicIP)

  Print "... determining connection type: "

  If lConFlags And %OLS_CONNECTION_MODEM Then Print "Modem "

  If lConFlags And %OLS_CONNECTION_LAN   Then Print "Lan "

  If lConFlags And %OLS_CONNECTION_PROXY Then Print "Proxy "

  PRINTL

  PRINTL "... it seems you are connected to Internet so script can proceed."

End If

PRINTL "-----------------------------------------------------------------------"

Created with Help+Manual 8 and styled with Premium Pack Version 4 © by EC Software