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
e06eaa49
Commit
e06eaa49
authored
Jul 26, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Activate the module's activation context while resolving imports and attaching.
parent
76bd190a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
loader.c
dlls/ntdll/loader.c
+7
-1
No files found.
dlls/ntdll/loader.c
View file @
e06eaa49
...
...
@@ -621,10 +621,12 @@ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path )
WINE_MODREF
*
prev
;
DWORD
size
;
NTSTATUS
status
;
ULONG_PTR
cookie
;
if
(
!
(
wm
->
ldr
.
Flags
&
LDR_DONT_RESOLVE_REFS
))
return
STATUS_SUCCESS
;
/* already done */
wm
->
ldr
.
Flags
&=
~
LDR_DONT_RESOLVE_REFS
;
create_module_activation_context
(
&
wm
->
ldr
);
if
(
!
create_module_activation_context
(
&
wm
->
ldr
))
RtlActivateActivationContext
(
0
,
wm
->
ldr
.
ActivationContext
,
&
cookie
);
if
(
!
(
imports
=
RtlImageDirectoryEntryToData
(
wm
->
ldr
.
BaseAddress
,
TRUE
,
IMAGE_DIRECTORY_ENTRY_IMPORT
,
&
size
)))
...
...
@@ -651,6 +653,7 @@ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path )
status
=
STATUS_DLL_NOT_FOUND
;
}
current_modref
=
prev
;
if
(
wm
->
ldr
.
ActivationContext
)
RtlDeactivateActivationContext
(
0
,
cookie
);
return
status
;
}
...
...
@@ -927,6 +930,7 @@ static BOOL MODULE_InitDLL( WINE_MODREF *wm, UINT reason, LPVOID lpReserved )
static
NTSTATUS
process_attach
(
WINE_MODREF
*
wm
,
LPVOID
lpReserved
)
{
NTSTATUS
status
=
STATUS_SUCCESS
;
ULONG_PTR
cookie
;
int
i
;
if
(
process_detaching
)
return
status
;
...
...
@@ -940,6 +944,7 @@ static NTSTATUS process_attach( WINE_MODREF *wm, LPVOID lpReserved )
/* Tag current MODREF to prevent recursive loop */
wm
->
ldr
.
Flags
|=
LDR_LOAD_IN_PROGRESS
;
if
(
wm
->
ldr
.
ActivationContext
)
RtlActivateActivationContext
(
0
,
wm
->
ldr
.
ActivationContext
,
&
cookie
);
/* Recursively attach all DLLs this one depends on */
for
(
i
=
0
;
i
<
wm
->
nDeps
;
i
++
)
...
...
@@ -971,6 +976,7 @@ static NTSTATUS process_attach( WINE_MODREF *wm, LPVOID lpReserved )
InsertTailList
(
&
NtCurrentTeb
()
->
Peb
->
LdrData
->
InInitializationOrderModuleList
,
&
wm
->
ldr
.
InInitializationOrderModuleList
);
if
(
wm
->
ldr
.
ActivationContext
)
RtlDeactivateActivationContext
(
0
,
cookie
);
/* Remove recursion flag */
wm
->
ldr
.
Flags
&=
~
LDR_LOAD_IN_PROGRESS
;
...
...
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