wininet: Fixed version returned by INTERNET_OPTION_VERSION.

This commit is contained in:
Jacek Caban 2008-02-26 20:20:14 +01:00 committed by Alexandre Julliard
parent 2823f1e8c0
commit 928c9f0984
2 changed files with 15 additions and 1 deletions

View File

@ -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;

View File

@ -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();
}