Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
79077f32
Commit
79077f32
authored
Sep 29, 1999
by
Ulrich Weigand
Committed by
Alexandre Julliard
Sep 29, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix: Don't call GetVersionExA too early, to avoid breaking
automatic emulated Windows version detection.
parent
260cd4ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
17 deletions
+20
-17
builtin.c
if1632/builtin.c
+0
-8
module.c
loader/module.c
+0
-8
module.c
loader/ne/module.c
+20
-1
No files found.
if1632/builtin.c
View file @
79077f32
...
...
@@ -146,7 +146,6 @@ static HMODULE16 BUILTIN_DoLoadModule16( const WIN16_DESCRIPTOR *descr )
NE_MODULE
*
pModule
;
int
minsize
;
SEGTABLEENTRY
*
pSegTable
;
OSVERSIONINFOA
versionInfo
;
HMODULE16
hModule
=
GLOBAL_CreateBlock
(
GMEM_MOVEABLE
,
descr
->
module_start
,
descr
->
module_size
,
0
,
...
...
@@ -159,13 +158,6 @@ static HMODULE16 BUILTIN_DoLoadModule16( const WIN16_DESCRIPTOR *descr )
pModule
=
(
NE_MODULE
*
)
GlobalLock16
(
hModule
);
pModule
->
self
=
hModule
;
/* Set expected_version according to the emulated Windows version */
versionInfo
.
dwOSVersionInfoSize
=
sizeof
(
versionInfo
);
if
(
GetVersionExA
(
&
versionInfo
)
)
pModule
->
expected_version
=
(
versionInfo
.
dwMajorVersion
&
0xff
)
<<
8
|
(
versionInfo
.
dwMinorVersion
&
0xff
);
/* Allocate the code segment */
pSegTable
=
NE_SEG_TABLE
(
pModule
);
...
...
loader/module.c
View file @
79077f32
...
...
@@ -341,7 +341,6 @@ HMODULE MODULE_CreateDummyModule( const OFSTRUCT *ofs, LPCSTR modName )
char
*
pStr
,
*
s
;
int
len
;
const
char
*
basename
;
OSVERSIONINFOA
versionInfo
;
INT
of_size
=
sizeof
(
OFSTRUCT
)
-
sizeof
(
ofs
->
szPathName
)
+
strlen
(
ofs
->
szPathName
)
+
1
;
...
...
@@ -379,13 +378,6 @@ HMODULE MODULE_CreateDummyModule( const OFSTRUCT *ofs, LPCSTR modName )
pModule
->
expected_version
=
0x030a
;
pModule
->
self
=
hModule
;
/* Set expected_version according to the emulated Windows version */
versionInfo
.
dwOSVersionInfoSize
=
sizeof
(
versionInfo
);
if
(
GetVersionExA
(
&
versionInfo
)
)
pModule
->
expected_version
=
(
versionInfo
.
dwMajorVersion
&
0xff
)
<<
8
|
(
versionInfo
.
dwMinorVersion
&
0xff
);
/* Set loaded file information */
memcpy
(
pModule
+
1
,
ofs
,
of_size
);
((
OFSTRUCT
*
)(
pModule
+
1
))
->
cBytes
=
of_size
-
1
;
...
...
loader/ne/module.c
View file @
79077f32
...
...
@@ -1388,7 +1388,26 @@ INT16 WINAPI GetModuleUsage16( HINSTANCE16 hModule )
WORD
WINAPI
GetExpWinVer16
(
HMODULE16
hModule
)
{
NE_MODULE
*
pModule
=
NE_GetPtr
(
hModule
);
return
pModule
?
pModule
->
expected_version
:
0
;
if
(
!
pModule
)
return
0
;
/*
* For built-in modules, fake the expected version the module should
* have according to the Windows version emulated by Wine
*
* FIXME: Should we really do this for Win32 dummy modules as well?
*/
if
(
(
pModule
->
flags
&
NE_FFLAGS_BUILTIN
)
||
(
pModule
->
flags
&
NE_FFLAGS_WIN32
)
)
{
OSVERSIONINFOA
versionInfo
;
versionInfo
.
dwOSVersionInfoSize
=
sizeof
(
versionInfo
);
if
(
GetVersionExA
(
&
versionInfo
)
)
return
(
versionInfo
.
dwMajorVersion
&
0xff
)
<<
8
|
(
versionInfo
.
dwMinorVersion
&
0xff
);
}
return
pModule
->
expected_version
;
}
...
...
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