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
8670b6f2
Commit
8670b6f2
authored
Oct 13, 1999
by
Andreas Mohr
Committed by
Alexandre Julliard
Oct 13, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added warning for future VERSION_GetVersion() (mis-)users and made
OSVERSIONINFO warning more detailed.
parent
84e2d6ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
version.c
misc/version.c
+15
-3
No files found.
misc/version.c
View file @
8670b6f2
...
...
@@ -237,6 +237,15 @@ DWORD VERSION_GetLinkedDllVersion(PDB *pdb)
/**********************************************************************
* VERSION_GetVersion
*
* WARNING !!!
* Don't call this function too early during the Wine init,
* as pdb->exe_modref (required by VERSION_GetImageVersion()) might still
* be NULL in such cases, which causes the winver to ALWAYS be detected
* as WIN31.
* And as we cache the winver once it has been determined, this is bad.
* This can happen much easier than you might think, as this function
* is called by EVERY GetVersion*() API !
*
* Some version data:
* linker/OS/image/subsys Name Intended for
*
...
...
@@ -331,7 +340,8 @@ BOOL16 WINAPI GetVersionEx16(OSVERSIONINFO16 *v)
WINDOWS_VERSION
ver
=
VERSION_GetVersion
();
if
(
v
->
dwOSVersionInfoSize
!=
sizeof
(
OSVERSIONINFO16
))
{
WARN
(
"wrong OSVERSIONINFO size from app"
);
WARN
(
"wrong OSVERSIONINFO size from app (got: %ld, expected: %d)"
,
v
->
dwOSVersionInfoSize
,
sizeof
(
OSVERSIONINFO16
));
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
return
FALSE
;
}
...
...
@@ -352,7 +362,8 @@ BOOL WINAPI GetVersionExA(OSVERSIONINFOA *v)
WINDOWS_VERSION
ver
=
VERSION_GetVersion
();
if
(
v
->
dwOSVersionInfoSize
!=
sizeof
(
OSVERSIONINFOA
))
{
WARN
(
"wrong OSVERSIONINFO size from app"
);
WARN
(
"wrong OSVERSIONINFO size from app (got: %ld, expected: %d)"
,
v
->
dwOSVersionInfoSize
,
sizeof
(
OSVERSIONINFOA
));
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
return
FALSE
;
}
...
...
@@ -374,7 +385,8 @@ BOOL WINAPI GetVersionExW(OSVERSIONINFOW *v)
if
(
v
->
dwOSVersionInfoSize
!=
sizeof
(
OSVERSIONINFOW
))
{
WARN
(
"wrong OSVERSIONINFO size from app"
);
WARN
(
"wrong OSVERSIONINFO size from app (got: %ld, expected: %d)"
,
v
->
dwOSVersionInfoSize
,
sizeof
(
OSVERSIONINFOW
));
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
return
FALSE
;
}
...
...
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