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
fa5b5102
Commit
fa5b5102
authored
Feb 21, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Moved LDR_DONT_RESOLVE_REFS handling into fixup_imports.
This ensures that we never fixup imports twice on the same dll.
parent
39a1a942
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
loader.c
dlls/ntdll/loader.c
+6
-9
No files found.
dlls/ntdll/loader.c
View file @
fa5b5102
...
...
@@ -584,6 +584,9 @@ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path )
DWORD
size
;
NTSTATUS
status
;
if
(
!
(
wm
->
ldr
.
Flags
&
LDR_DONT_RESOLVE_REFS
))
return
STATUS_SUCCESS
;
/* already done */
wm
->
ldr
.
Flags
&=
~
LDR_DONT_RESOLVE_REFS
;
if
(
!
(
imports
=
RtlImageDirectoryEntryToData
(
wm
->
ldr
.
BaseAddress
,
TRUE
,
IMAGE_DIRECTORY_ENTRY_IMPORT
,
&
size
)))
return
STATUS_SUCCESS
;
...
...
@@ -634,7 +637,7 @@ static WINE_MODREF *alloc_module( HMODULE hModule, LPCWSTR filename )
wm
->
ldr
.
BaseAddress
=
hModule
;
wm
->
ldr
.
EntryPoint
=
NULL
;
wm
->
ldr
.
SizeOfImage
=
nt
->
OptionalHeader
.
SizeOfImage
;
wm
->
ldr
.
Flags
=
0
;
wm
->
ldr
.
Flags
=
LDR_DONT_RESOLVE_REFS
;
wm
->
ldr
.
LoadCount
=
0
;
wm
->
ldr
.
TlsIndex
=
-
1
;
wm
->
ldr
.
SectionHandle
=
NULL
;
...
...
@@ -1393,7 +1396,6 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, HANDLE file,
return
status
;
}
}
else
wm
->
ldr
.
Flags
|=
LDR_DONT_RESOLVE_REFS
;
/* send DLL load event */
...
...
@@ -1682,12 +1684,8 @@ static NTSTATUS load_dll( LPCWSTR load_path, LPCWSTR libname, DWORD flags, WINE_
{
if
((
*
pwm
)
->
ldr
.
LoadCount
!=
-
1
)
(
*
pwm
)
->
ldr
.
LoadCount
++
;
if
(((
*
pwm
)
->
ldr
.
Flags
&
LDR_DONT_RESOLVE_REFS
)
&&
!
(
flags
&
DONT_RESOLVE_DLL_REFERENCES
))
{
(
*
pwm
)
->
ldr
.
Flags
&=
~
LDR_DONT_RESOLVE_REFS
;
fixup_imports
(
*
pwm
,
load_path
);
}
if
(
!
(
flags
&
DONT_RESOLVE_DLL_REFERENCES
))
fixup_imports
(
*
pwm
,
load_path
);
TRACE
(
"Found loaded module %s for %s at %p, count=%d
\n
"
,
debugstr_w
((
*
pwm
)
->
ldr
.
FullDllName
.
Buffer
),
debugstr_w
(
libname
),
(
*
pwm
)
->
ldr
.
BaseAddress
,
(
*
pwm
)
->
ldr
.
LoadCount
);
...
...
@@ -2044,7 +2042,6 @@ void WINAPI LdrInitializeThunk( ULONG unknown1, ULONG unknown2, ULONG unknown3,
goto
error
;
}
wm
->
ldr
.
LoadCount
=
-
1
;
/* can't unload main exe */
wm
->
ldr
.
Flags
&=
~
LDR_DONT_RESOLVE_REFS
;
peb
->
ProcessParameters
->
ImagePathName
=
wm
->
ldr
.
FullDllName
;
version_init
(
wm
->
ldr
.
FullDllName
.
Buffer
);
...
...
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