Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8e917352
Commit
8e917352
authored
Oct 06, 2014
by
André Hentschel
Committed by
Alexandre Julliard
Oct 09, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Skip on faked version values.
parent
df5ff98b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
7 deletions
+28
-7
version.c
dlls/kernel32/tests/version.c
+28
-7
No files found.
dlls/kernel32/tests/version.c
View file @
8e917352
...
...
@@ -23,23 +23,29 @@
#include "wine/test.h"
#include "winbase.h"
#include "winternl.h"
static
BOOL
(
WINAPI
*
pGetProductInfo
)(
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
*
);
static
BOOL
(
WINAPI
*
pVerifyVersionInfoA
)(
LPOSVERSIONINFOEXA
,
DWORD
,
DWORDLONG
);
static
ULONGLONG
(
WINAPI
*
pVerSetConditionMask
)(
ULONGLONG
,
DWORD
,
BYTE
);
static
NTSTATUS
(
WINAPI
*
pRtlGetVersion
)(
RTL_OSVERSIONINFOEXW
*
);
#define
KERNEL32_
GET_PROC(func) \
p##func = (void *)GetProcAddress(h
Kernel32
, #func);
#define GET_PROC(func) \
p##func = (void *)GetProcAddress(h
mod
, #func);
static
void
init_function_pointers
(
void
)
{
HMODULE
h
Kernel32
;
HMODULE
h
mod
;
h
Kernel32
=
GetModuleHandleA
(
"kernel32.dll"
);
h
mod
=
GetModuleHandleA
(
"kernel32.dll"
);
KERNEL32_GET_PROC
(
GetProductInfo
);
KERNEL32_GET_PROC
(
VerifyVersionInfoA
);
KERNEL32_GET_PROC
(
VerSetConditionMask
);
GET_PROC
(
GetProductInfo
);
GET_PROC
(
VerifyVersionInfoA
);
GET_PROC
(
VerSetConditionMask
);
hmod
=
GetModuleHandleA
(
"ntdll.dll"
);
GET_PROC
(
RtlGetVersion
);
}
static
void
test_GetProductInfo
(
void
)
...
...
@@ -170,6 +176,21 @@ static void test_VerifyVersionInfo(void)
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEXA
);
GetVersionExA
((
OSVERSIONINFOA
*
)
&
info
);
servicepack
=
info
.
wServicePackMajor
;
/* Win8.1+ returns Win8 version in GetVersionEx when there's no app manifest targeting 8.1 */
if
(
info
.
dwMajorVersion
==
6
&&
info
.
dwMinorVersion
==
2
)
{
RTL_OSVERSIONINFOEXW
rtlinfo
;
rtlinfo
.
dwOSVersionInfoSize
=
sizeof
(
RTL_OSVERSIONINFOEXW
);
ok
(
SUCCEEDED
(
pRtlGetVersion
(
&
rtlinfo
)),
"RtlGetVersion failed
\n
"
);
if
(
rtlinfo
.
dwMajorVersion
!=
6
||
rtlinfo
.
dwMinorVersion
!=
2
)
{
win_skip
(
"GetVersionEx and VerifyVersionInfo are faking values
\n
"
);
return
;
}
}
memset
(
&
info
,
0
,
sizeof
(
info
));
ret
=
pVerifyVersionInfoA
(
&
info
,
VER_MAJORVERSION
|
VER_MINORVERSION
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment