denmead
asked on
Detecting if the computer is on-line
The function InternetOpenUrl () generates a Dial-up Connection dialog box. If you select cancel it flashes back up twice more.
How do I detect the user has selected cancel and avoid flashing up irritating Dial-up Connection dialog box.
How do I detect the user has selected cancel and avoid flashing up irritating Dial-up Connection dialog box.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ZOPPO
I think InternetGetConnectedState has been broken in IE5 - my program which works perfectly well with IE4 does not work with IE5.
If the app is running and IE goes offline - then my app notices this. However if my app is started when IE is offline my app will actually say IE is online.
Could you check this and make sure I am not going mad. (only if you have time of course - If you think I should, I'll post it as a question but, I am not sure how to phrase it or how to judge the answer)
Whenever anyone asks this question 'our' response is always to say InternetGetConnectedState etc and I want to make sure we are not giving duff advice.
I think it is related to the wininet library being initialised for the first time for an app - but I can't put my finger on it.
My simple test app was a dialog only app with a 1 second WM_TIMER message going off and it was displaying its info (dwState) to a CStatic. and the only function it called was InternetGetConnectedState( ...).
I think InternetGetConnectedState has been broken in IE5 - my program which works perfectly well with IE4 does not work with IE5.
If the app is running and IE goes offline - then my app notices this. However if my app is started when IE is offline my app will actually say IE is online.
Could you check this and make sure I am not going mad. (only if you have time of course - If you think I should, I'll post it as a question but, I am not sure how to phrase it or how to judge the answer)
Whenever anyone asks this question 'our' response is always to say InternetGetConnectedState etc and I want to make sure we are not giving duff advice.
I think it is related to the wininet library being initialised for the first time for an app - but I can't put my finger on it.
My simple test app was a dialog only app with a 1 second WM_TIMER message going off and it was displaying its info (dwState) to a CStatic. and the only function it called was InternetGetConnectedState(
ZOPPO
I think InternetGetConnectedState has been broken in IE5 - my program which works perfectly well with IE4 does not work with IE5.
If the app is running and IE goes offline - then my app notices this. However if my app is started when IE is offline my app will actually say IE is online.
Could you check this and make sure I am not going mad. (only if you have time of course - If you think I should, I'll post it as a question but, I am not sure how to phrase it or how to judge the answer)
Whenever anyone asks this question 'our' response is always to say InternetGetConnectedState etc and I want to make sure we are not giving duff advice.
I think it is related to the wininet library being initialised for the first time for an app - but I can't put my finger on it.
My simple test app was a dialog only app with a 1 second WM_TIMER message going off and it was displaying its info (dwState) to a CStatic. and the only function it called was InternetGetConnectedState( ...).
I think InternetGetConnectedState has been broken in IE5 - my program which works perfectly well with IE4 does not work with IE5.
If the app is running and IE goes offline - then my app notices this. However if my app is started when IE is offline my app will actually say IE is online.
Could you check this and make sure I am not going mad. (only if you have time of course - If you think I should, I'll post it as a question but, I am not sure how to phrase it or how to judge the answer)
Whenever anyone asks this question 'our' response is always to say InternetGetConnectedState etc and I want to make sure we are not giving duff advice.
I think it is related to the wininet library being initialised for the first time for an app - but I can't put my finger on it.
My simple test app was a dialog only app with a 1 second WM_TIMER message going off and it was displaying its info (dwState) to a CStatic. and the only function it called was InternetGetConnectedState(
ASKER
I don't think ping is the way to do it.
I like the look of the InternetGetConnectedState () so I think I will try that.
Q242558 says use InternetOpenURL () when you want to try to connect. But this give three dial-up dialog boxes if you click on cancel.
IE5 gives a dialog box with an off-line button.
How do they do that?
I like the look of the InternetGetConnectedState () so I think I will try that.
Q242558 says use InternetOpenURL () when you want to try to connect. But this give three dial-up dialog boxes if you click on cancel.
IE5 gives a dialog box with an off-line button.
How do they do that?
ASKER
I've found what looks like a good answer to my question at:
http://msdn.microsoft.com/workshop/components/offline/offline.asp
ASKER
Thanks Zoppo you pointed me in the right direction
try to find code for Ping on codeguru - many, many classes can make this