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
47da086a
Commit
47da086a
authored
Mar 14, 2018
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Change module load order so it matches InLoadOrderModuleList.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
77d9c175
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
loader.c
dlls/ntdll/loader.c
+10
-5
No files found.
dlls/ntdll/loader.c
View file @
47da086a
...
...
@@ -89,6 +89,7 @@ typedef struct _wine_modref
LDR_MODULE
ldr
;
dev_t
dev
;
ino_t
ino
;
int
alloc_deps
;
int
nDeps
;
struct
_wine_modref
**
deps
;
}
WINE_MODREF
;
...
...
@@ -483,15 +484,16 @@ static FARPROC find_forwarded_export( HMODULE module, const char *forward, LPCWS
if
(
!
imports_fixup_done
&&
current_modref
)
{
WINE_MODREF
**
deps
;
if
(
current_modref
->
nD
eps
)
if
(
current_modref
->
alloc_d
eps
)
deps
=
RtlReAllocateHeap
(
GetProcessHeap
(),
0
,
current_modref
->
deps
,
(
current_modref
->
nD
eps
+
1
)
*
sizeof
(
*
deps
)
);
(
current_modref
->
alloc_d
eps
+
1
)
*
sizeof
(
*
deps
)
);
else
deps
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
sizeof
(
*
deps
)
);
if
(
deps
)
{
deps
[
current_modref
->
nDeps
++
]
=
wm
;
current_modref
->
deps
=
deps
;
current_modref
->
alloc_deps
++
;
}
}
else
if
(
process_attach
(
wm
,
NULL
)
!=
STATUS_SUCCESS
)
...
...
@@ -936,6 +938,7 @@ static NTSTATUS fixup_imports_ilonly( WINE_MODREF *wm, LPCWSTR load_path, void *
wm
->
ldr
.
Flags
&=
~
LDR_DONT_RESOLVE_REFS
;
wm
->
nDeps
=
1
;
wm
->
alloc_deps
=
1
;
wm
->
deps
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
sizeof
(
WINE_MODREF
*
)
);
prev
=
current_modref
;
...
...
@@ -968,7 +971,7 @@ static NTSTATUS fixup_imports_ilonly( WINE_MODREF *wm, LPCWSTR load_path, void *
*/
static
NTSTATUS
fixup_imports
(
WINE_MODREF
*
wm
,
LPCWSTR
load_path
)
{
int
i
,
nb_imports
;
int
i
,
dep
,
nb_imports
;
const
IMAGE_IMPORT_DESCRIPTOR
*
imports
;
WINE_MODREF
*
prev
,
*
imp
;
DWORD
size
;
...
...
@@ -993,7 +996,7 @@ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path )
RtlActivateActivationContext
(
0
,
wm
->
ldr
.
ActivationContext
,
&
cookie
);
/* Allocate module dependency list */
wm
->
nD
eps
=
nb_imports
;
wm
->
alloc_d
eps
=
nb_imports
;
wm
->
deps
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
nb_imports
*
sizeof
(
WINE_MODREF
*
)
);
/* load the imported modules. They are automatically
...
...
@@ -1004,12 +1007,14 @@ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path )
status
=
STATUS_SUCCESS
;
for
(
i
=
0
;
i
<
nb_imports
;
i
++
)
{
dep
=
wm
->
nDeps
++
;
if
(
!
import_dll
(
wm
->
ldr
.
BaseAddress
,
&
imports
[
i
],
load_path
,
&
imp
))
{
imp
=
NULL
;
status
=
STATUS_DLL_NOT_FOUND
;
}
wm
->
deps
[
i
]
=
imp
;
wm
->
deps
[
dep
]
=
imp
;
}
current_modref
=
prev
;
if
(
wm
->
ldr
.
ActivationContext
)
RtlDeactivateActivationContext
(
0
,
cookie
);
...
...
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