
CInternetSession QueryOption function always return true.
VC++ 6.0, Win 98, NT 4.0 IE 5.00.2614.3500
Good day Gentlemen and Ladies:
We are developing an app that needs to query the net for a session. With
the code snippet below QueryOption always return TRUE (disconnected
computer from network).
In Myfile.h
CInternetSession *mTheInternetSession;
In Myfile.cpp
BOOL bResult=FALSE;
DWORD queryData=0;
DWORD queryDataSz;
bResult =
mTheInternetSession->QueryOption(INTERNET_OPTION_CONNECTED_STATE,
(LPVOID)&queryData, &queryDataSz);
if (bResult) {
CString msgStr;
msgStr.Format("On_InetMgr_Msg QueryOption returned
%d\n", queryData);
OutputDebugString(msgStr);
}
We also tried the following two functions:
bResult =
mTheInternetSession->QueryOption(INTERNET_OPTION_CONNECTED_STATE,
queryData);
NOTE: This is an undocumented function
CString queryStr;
bResult =
mTheInternetSession->QueryOption(INTERNET_OPTION_CONNECTED_STATE,
queryStr);
Thank you in advance for any assistance.
Tony D. Abel
Sent via Deja.com http://www.*-*-*.com/
Before you buy.