On Fri, 2006-02-03 at 15:36 +0530, Vijay Kiran Kamuju wrote:
+SetLastError(0xdeadbeef);
retval=InternetQueryOptionA(hinet,INTERNET_OPTION_USER_AGENT,NULL,&len);
+err=GetLastError();
You need to initialize length parameter before InternetQueryOption call.