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
009342a8
Commit
009342a8
authored
Mar 11, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Make the load order for a 16-bit stand-alone dll match its 32-bit owner.
parent
81f8c037
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
ne_module.c
dlls/kernel32/ne_module.c
+24
-2
No files found.
dlls/kernel32/ne_module.c
View file @
009342a8
...
...
@@ -1046,7 +1046,7 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_
const
IMAGE_DOS_HEADER
*
descr
=
NULL
;
const
char
*
file_name
=
NULL
;
char
dllname
[
32
],
owner
[
20
],
*
p
;
const
char
*
basename
;
const
char
*
basename
,
*
main_module
;
int
owner_exists
=
FALSE
;
/* strip path information */
...
...
@@ -1075,11 +1075,33 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_
{
TRACE
(
"found %s with embedded 16-bit module
\n
"
,
debugstr_a
(
dllname
)
);
file_name
=
basename
;
/* if module has a 32-bit owner, match the load order of the owner */
if
((
main_module
=
(
void
*
)
GetProcAddress
(
mod32
,
"__wine_spec_main_module"
)))
{
LDR_MODULE
*
ldr
;
HMODULE
main_owner
=
LoadLibraryA
(
main_module
);
if
(
!
main_owner
)
{
WARN
(
"couldn't load owner %s for 16-bit dll %s
\n
"
,
main_module
,
dllname
);
FreeLibrary
(
mod32
);
return
ERROR_FILE_NOT_FOUND
;
}
/* check if module was loaded native */
if
(
LdrFindEntryForAddress
(
main_owner
,
&
ldr
)
||
!
(
ldr
->
Flags
&
LDR_WINE_INTERNAL
))
{
FreeLibrary
(
mod32
);
descr
=
NULL
;
}
FreeLibrary
(
main_owner
);
}
}
}
*
p
=
0
;
if
(
!
descr
&&
wine_dll_get_owner
(
dllname
,
owner
,
sizeof
(
owner
),
&
owner_exists
)
!=
-
1
)
/* old-style 16-bit placeholders support, to be removed at some point */
if
(
!
mod32
&&
wine_dll_get_owner
(
dllname
,
owner
,
sizeof
(
owner
),
&
owner_exists
)
!=
-
1
)
{
mod32
=
LoadLibraryA
(
owner
);
if
(
mod32
)
...
...
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