Commit 928c9f09 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Fixed version returned by INTERNET_OPTION_VERSION.

parent 2823f1e8
......@@ -2393,7 +2393,7 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
INTERNET_SetLastError(ERROR_INSUFFICIENT_BUFFER);
else
{
static const INTERNET_VERSION_INFO info = { 6, 0 };
static const INTERNET_VERSION_INFO info = { 1, 2 };
memcpy(lpBuffer, &info, sizeof(info));
*lpdwBufferLength = sizeof(info);
bSuccess = TRUE;
......
......@@ -321,6 +321,19 @@ static void test_null(void)
ok(r == TRUE, "ret %d\n", r);
}
static void test_version(void)
{
INTERNET_VERSION_INFO version;
DWORD size;
BOOL res;
size = sizeof(version);
res = InternetQueryOptionA(NULL, INTERNET_OPTION_VERSION, &version, &size);
ok(res, "Could not get version: %u\n", GetLastError());
ok(version.dwMajorVersion == 1, "dwMajorVersion=%d, expected 1\n", version.dwMajorVersion);
ok(version.dwMinorVersion == 2, "dwMinorVersion=%d, expected 2\n", version.dwMinorVersion);
}
/* ############################### */
START_TEST(internet)
......@@ -328,5 +341,6 @@ START_TEST(internet)
test_InternetCanonicalizeUrlA();
test_InternetQueryOptionA();
test_get_cookie();
test_version();
test_null();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment