z***@gmail.com
2007-01-12 07:11:05 UTC
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..
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..