[wininet]add implementation of few more options

Dmitry Timoshkov dmitry at baikal.ru
Tue Nov 8 08:46:06 CST 2005


"Vijay Kiran Kamuju" infyquest at gmail.com wrote:

> + retval=InternetQueryOptionA(hinet,INTERNET_OPTION_USER_AGENT,NULL,&len);
> + err=GetLastError();
> + ok(len == strlen(useragent)+1,"Got wrong user agent length %ld len instead of %d\n",len,strlen(useragent));
> + ok(retval == 0,"Got wrong return value %d\n",retval);
> + ok(err == ERROR_INSUFFICIENT_BUFFER, "Got wrong error code%ld\n",err);

You need to set last error to some bogus value before calling an API
in order to make sure that the API really changes it. Usually setting
last error to 0xdeadbeef works fine for that purpose.

-- 
Dmitry.




More information about the wine-devel mailing list