Click here to Skip to main content
16,013,322 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: InnoSetup Pin
JensB24-Jul-03 2:08
JensB24-Jul-03 2:08 
GeneralRe: InnoSetup Pin
JensB24-Jul-03 2:21
JensB24-Jul-03 2:21 
GeneralRe: InnoSetup Pin
Toni7824-Jul-03 2:36
Toni7824-Jul-03 2:36 
GeneralRe: InnoSetup Pin
John M. Drescher24-Jul-03 5:53
John M. Drescher24-Jul-03 5:53 
GeneralRe: InnoSetup Pin
Toni7824-Jul-03 12:44
Toni7824-Jul-03 12:44 
Generallib + message map problem Pin
User-37793624-Jul-03 0:19
User-37793624-Jul-03 0:19 
GeneralRe: lib + message map problem Pin
Frank K24-Jul-03 2:31
Frank K24-Jul-03 2:31 
GeneralDetect Internet Connection Pin
Abhi@Work24-Jul-03 0:15
Abhi@Work24-Jul-03 0:15 
Hi Guys!!

I want to check Internet connectivity on my machine. I`ve reproduced my code below.
The code works fine except if IE is in offline mode.i.e i am unable to detect offline mode..

#include "stdafx.h"
#include "Wininet.h"

int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
BOOL bConnected = FALSE;
DWORD dwFlags;

bConnected = InternetGetConnectedState ( &dwFlags, 0 );
if ( bConnected )
if ( dwFlags & INTERNET_CONNECTION_OFFLINE )
bConnected = FALSE;

if (bConnected )
MessageBox(0,"WOW ! Internet is Connected !","",0);
else
MessageBox(0, "Oops ! Internet is not Connected !","",0);

return 0;
}

Regards!!

Abhi

P.S Tony, Ryan please have a look.
GeneralRe: Detect Internet Connection Pin
Toni7824-Jul-03 0:51
Toni7824-Jul-03 0:51 
GeneralRe: Detect Internet Connection Pin
Abhi@Work24-Jul-03 15:30
Abhi@Work24-Jul-03 15:30 
GeneralRe: Detect Internet Connection Pin
Toni7825-Jul-03 12:07
Toni7825-Jul-03 12:07 
QuestionHow make CDatabase instance gobal Pin
ValliS24-Jul-03 0:06
ValliS24-Jul-03 0:06 
AnswerRe: How make CDatabase instance gobal Pin
Jonathan de Halleux24-Jul-03 0:28
Jonathan de Halleux24-Jul-03 0:28 
AnswerRe: How make CDatabase instance gobal Pin
Michael P Butler24-Jul-03 0:36
Michael P Butler24-Jul-03 0:36 
GeneralRe: How make CDatabase instance gobal Pin
ValliS24-Jul-03 2:18
ValliS24-Jul-03 2:18 
GeneralShutdown PC Pin
Anonymous23-Jul-03 23:44
Anonymous23-Jul-03 23:44 
GeneralRe: Shutdown PC Pin
Toni7823-Jul-03 23:56
Toni7823-Jul-03 23:56 
GeneralRe: Shutdown PC Pin
Anonymous24-Jul-03 1:11
Anonymous24-Jul-03 1:11 
GeneralRe: Shutdown PC Pin
Ryan Binns24-Jul-03 1:25
Ryan Binns24-Jul-03 1:25 
GeneralRe: Shutdown PC Pin
Toni7824-Jul-03 1:53
Toni7824-Jul-03 1:53 
GeneralRe: Shutdown PC Pin
Anonymous24-Jul-03 3:19
Anonymous24-Jul-03 3:19 
GeneralRe: Shutdown PC Pin
Fistboy24-Jul-03 2:37
Fistboy24-Jul-03 2:37 
GeneralDifference Between DLL and Lib Pin
Anonymous23-Jul-03 23:25
Anonymous23-Jul-03 23:25 
GeneralRe: Difference Between DLL and Lib Pin
Cedric Moonen23-Jul-03 23:35
Cedric Moonen23-Jul-03 23:35 
GeneralRe: Difference Between DLL and Lib Pin
melwyn23-Jul-03 23:57
melwyn23-Jul-03 23:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.