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
490bb349
Commit
490bb349
authored
Dec 10, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winetest: Report information about the CPU and host OS.
parent
66eb4bd3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
3 deletions
+25
-3
main.c
programs/winetest/main.c
+25
-3
No files found.
programs/winetest/main.c
View file @
490bb349
...
...
@@ -147,10 +147,23 @@ static int running_on_visible_desktop (void)
static
void
print_version
(
void
)
{
#ifdef __i386__
static
const
char
platform
[]
=
"i386"
;
#elif defined(__x86_64__)
static
const
char
platform
[]
=
"x86_64"
;
#elif defined(__sparc__)
static
const
char
platform
[]
=
"sparc"
;
#elif defined(__ALPHA__)
static
const
char
platform
[]
=
"alpha"
;
#elif defined(__powerpc__)
static
const
char
platform
[]
=
"powerpc"
;
#endif
OSVERSIONINFOEX
ver
;
BOOL
ext
;
BOOL
ext
,
wow64
;
int
is_win2k3_r2
;
const
char
*
(
*
wine_get_build_id
)(
void
);
const
char
*
(
CDECL
*
wine_get_build_id
)(
void
);
void
(
CDECL
*
wine_get_host_version
)(
const
char
**
sysname
,
const
char
**
release
);
BOOL
(
WINAPI
*
pIsWow64Process
)(
HANDLE
hProcess
,
PBOOL
Wow64Process
);
ver
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
);
if
(
!
(
ext
=
GetVersionEx
((
OSVERSIONINFO
*
)
&
ver
)))
...
...
@@ -159,7 +172,10 @@ static void print_version (void)
if
(
!
GetVersionEx
((
OSVERSIONINFO
*
)
&
ver
))
report
(
R_FATAL
,
"Can't get OS version."
);
}
pIsWow64Process
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"kernel32.dll"
),
"IsWow64Process"
);
if
(
!
pIsWow64Process
||
!
pIsWow64Process
(
GetCurrentProcess
(),
&
wow64
))
wow64
=
FALSE
;
xprintf
(
" Platform=%s%s
\n
"
,
platform
,
wow64
?
" (WOW64)"
:
""
);
xprintf
(
" bRunningUnderWine=%d
\n
"
,
running_under_wine
());
xprintf
(
" bRunningOnVisibleDesktop=%d
\n
"
,
running_on_visible_desktop
());
xprintf
(
" dwMajorVersion=%u
\n
dwMinorVersion=%u
\n
"
...
...
@@ -168,8 +184,14 @@ static void print_version (void)
ver
.
dwPlatformId
,
ver
.
szCSDVersion
);
wine_get_build_id
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"ntdll.dll"
),
"wine_get_build_id"
);
wine_get_host_version
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"ntdll.dll"
),
"wine_get_host_version"
);
if
(
wine_get_build_id
)
xprintf
(
" WineBuild=%s
\n
"
,
wine_get_build_id
()
);
if
(
wine_get_host_version
)
{
const
char
*
sysname
,
*
release
;
wine_get_host_version
(
&
sysname
,
&
release
);
xprintf
(
" Host system=%s
\n
Host version=%s
\n
"
,
sysname
,
release
);
}
is_win2k3_r2
=
GetSystemMetrics
(
SM_SERVERR2
);
if
(
is_win2k3_r2
)
xprintf
(
" R2 build number=%d
\n
"
,
is_win2k3_r2
);
...
...
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