<Return[I]><Top>

InternetGetConnectedState

Declare Function Api_InternetGetConnectedState& Lib "wininet" Alias "InternetGetConnectedState" (ByRef lpdwFlags&, ByVal dwReserved&)

Declare Function InternetGetConnectedState Lib "wininet" (ByRef dwflags As Long, ByVal dwReserved As Long) As Long

ローカルシステムのインターネット接続状況を返す。

パラメータ

lpdwFlags

    Pointer to a variable that receives the connection description.

    This parameter may return a valid flag even when the function returns FALSE.

    次の定数(値)を指定する。

    定数                                        

値          

意味                                                                                                                  

    INTERNET_CONNECTION

                        _CONFIGURED

&H40

 

Local system has a valid connection to the Internet, but it might or might not be currently connected.

    INTERNET_CONNECTION

                                        _LAN

&H2

 

Local system uses a local area network to connect to the Internet.

 

    INTERNET_CONNECTION

                                  _MODEM

&H1

 

Local system uses a modem to connect to the Internet.

 

    INTERNET_CONNECTION

                       _MODEM_BUSY

&H8

 

No longer used.

 

    INTERNET_CONNECTION

                                _OFFLINE

&H20

 

Local system is in offline mode.

 

    INTERNET_CONNECTION

                                    _PROXY

&H4

 

Local system uses a proxy server to connect to the Internet.

 

dwReserved

    0 を指定する。
 
戻り値
    Returns TRUE if there is an active modem or a LAN Internet connection, or FALSE if there is no Internet connection, or if all

    possible Internet connections are not currently active. For more information, see the Remarks section.
    When InternetGetConnectedState returns FALSE, the application can call GetLastError to retrieve the error code.