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
ed893d35
Commit
ed893d35
authored
Nov 21, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Delay attaching to dlls loaded because of a forwarded entry point.
Based on a patch by Sebastian Lackner. Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8477ae27
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
loader.c
dlls/ntdll/loader.c
+19
-4
No files found.
dlls/ntdll/loader.c
View file @
ed893d35
...
...
@@ -473,7 +473,21 @@ static FARPROC find_forwarded_export( HMODULE module, const char *forward, LPCWS
if
(
load_dll
(
load_path
,
mod_name
,
0
,
&
wm
)
==
STATUS_SUCCESS
&&
!
(
wm
->
ldr
.
Flags
&
LDR_DONT_RESOLVE_REFS
))
{
if
(
process_attach
(
wm
,
NULL
)
!=
STATUS_SUCCESS
)
if
(
!
imports_fixup_done
&&
current_modref
)
{
WINE_MODREF
**
deps
;
if
(
current_modref
->
nDeps
)
deps
=
RtlReAllocateHeap
(
GetProcessHeap
(),
0
,
current_modref
->
deps
,
(
current_modref
->
nDeps
+
1
)
*
sizeof
(
*
deps
)
);
else
deps
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
sizeof
(
*
deps
)
);
if
(
deps
)
{
deps
[
current_modref
->
nDeps
++
]
=
wm
;
current_modref
->
deps
=
deps
;
}
}
else
if
(
process_attach
(
wm
,
NULL
)
!=
STATUS_SUCCESS
)
{
LdrUnloadDll
(
wm
->
ldr
.
BaseAddress
);
wm
=
NULL
;
...
...
@@ -906,7 +920,7 @@ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path )
{
int
i
,
nb_imports
;
const
IMAGE_IMPORT_DESCRIPTOR
*
imports
;
WINE_MODREF
*
prev
;
WINE_MODREF
*
prev
,
*
imp
;
DWORD
size
;
NTSTATUS
status
;
ULONG_PTR
cookie
;
...
...
@@ -940,11 +954,12 @@ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path )
status
=
STATUS_SUCCESS
;
for
(
i
=
0
;
i
<
nb_imports
;
i
++
)
{
if
(
!
import_dll
(
wm
->
ldr
.
BaseAddress
,
&
imports
[
i
],
load_path
,
&
wm
->
deps
[
i
]
))
if
(
!
import_dll
(
wm
->
ldr
.
BaseAddress
,
&
imports
[
i
],
load_path
,
&
imp
))
{
wm
->
deps
[
i
]
=
NULL
;
imp
=
NULL
;
status
=
STATUS_DLL_NOT_FOUND
;
}
wm
->
deps
[
i
]
=
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