Newsgroups : Microsoft : microsoft.public.inetsdk.programming.wininet : 2007 Jan : InternetGetConnectedState crash
| Subject: | InternetGetConnectedState crash |
| Posted by: | zidanso..@gmail.com |
| Date: | 11 Jan 2007 23:11:05 |
I am new comer in WinInet..
i have to check internet connection exist or not ,i wrote this code
DWORD outFlag=0;
bool isConnect = InternetGetConnectedState(&outFlag,0);
this is wroking fine, but one particular system giving crash when try
to call this method(access violation ).
DWORD *outFlag=new DWORD;
bool isConnect = InternetGetConnectedState(outFlag,0);
and tried this way
typedef _stdcall bool pF(LPDWORD,DWORD);
pF *checkState ;
HMODULE hMod=::LoadLibrary("wininet.dll");
checkState =(pF*) ::GetProcAddress(hMod,"InternetGetConnectedState");
bool k = checkState(flag,0);
this is also crashing..
please correct me if i did any mistake..