I want to wait until internet comes so i created a loop with InternetGetConnectedState function.I started program when internet is disabled.Then I enable internet.But still it can ‘t exists.What should i do?
LPWORD bur;
int abc;
abc = InternetGetConnectedState(bur,0);
while (abc==0){
printf ("zzz");
if (abc==1)
break;
}
try putting the call in the loop , abc will never change.
Also, you shouldn’t assign the result to abc….also, its a DWORD…
and then comparing it to 1 or 0 is not really going to tell you anything, have a look at the flags it can return :-