Check whether the user is working off-line

Check whether the user is working off-line

Internet Explorer offers the possibility to simulate an Internet connection with the off-line mode. If you want to know if off-line mode is on or off you can use InternetQueryOption API.

Const INTERNET_OPTION_CONNECTED_STATE = 50Const INTERNET_STATE_DISCONNECTED_BY_USER = &H10Private Type INTERNET_CONNECTED_INFO    dwConnectedState As Long    dwFlags As LongEnd TypePrivate Declare Function InternetQueryOption Lib "wininet.dll" Alias _    "InternetQueryOptionA" (ByVal hInternet As Long, ByVal dwOption As Long, _    lpBuffer As INTERNET_CONNECTED_INFO, lpdwBufferLength As Long) As Boolean' Return True if the user is working off-lineFunction IsWorkingOffLine() As Boolean    Dim dwState As Long, dwSize As Long    Dim ci As INTERNET_CONNECTED_INFO    dwState = 0    dwSize = LenB(dwState)    If InternetQueryOption(0&, INTERNET_OPTION_CONNECTED_STATE, ci, dwSize) Then        IsWorkingOffLine = (ci.dwConnectedState And _            INTERNET_STATE_DISCONNECTED_BY_USER)    End IfEnd Function

Share the Post:
data observability

Data Observability Explained

Data is the lifeblood of any successful business, as it is the driving force behind critical decision-making, insight generation, and strategic development. However, due to its intricate nature, ensuring the

Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular