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
7aa6dcaf
Commit
7aa6dcaf
authored
Mar 06, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Handle LOAD_LIBRARY_AS_IMAGE_RESOURCE modules when loading resources.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9566c50a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
11 deletions
+8
-11
loader.c
dlls/ntdll/loader.c
+2
-5
resource.c
dlls/ntdll/resource.c
+6
-6
No files found.
dlls/ntdll/loader.c
View file @
7aa6dcaf
...
@@ -3277,11 +3277,8 @@ PVOID WINAPI RtlImageDirectoryEntryToData( HMODULE module, BOOL image, WORD dir,
...
@@ -3277,11 +3277,8 @@ PVOID WINAPI RtlImageDirectoryEntryToData( HMODULE module, BOOL image, WORD dir,
const
IMAGE_NT_HEADERS
*
nt
;
const
IMAGE_NT_HEADERS
*
nt
;
DWORD
addr
;
DWORD
addr
;
if
((
ULONG_PTR
)
module
&
1
)
/* mapped as data file */
if
((
ULONG_PTR
)
module
&
1
)
image
=
FALSE
;
/* mapped as data file */
{
module
=
(
HMODULE
)((
ULONG_PTR
)
module
&
~
3
);
module
=
(
HMODULE
)((
ULONG_PTR
)
module
&
~
1
);
image
=
FALSE
;
}
if
(
!
(
nt
=
RtlImageNtHeader
(
module
)))
return
NULL
;
if
(
!
(
nt
=
RtlImageNtHeader
(
module
)))
return
NULL
;
if
(
nt
->
OptionalHeader
.
Magic
==
IMAGE_NT_OPTIONAL_HDR64_MAGIC
)
if
(
nt
->
OptionalHeader
.
Magic
==
IMAGE_NT_OPTIONAL_HDR64_MAGIC
)
{
{
...
...
dlls/ntdll/resource.c
View file @
7aa6dcaf
...
@@ -333,12 +333,12 @@ static inline NTSTATUS access_resource( HMODULE hmod, const IMAGE_RESOURCE_DATA_
...
@@ -333,12 +333,12 @@ static inline NTSTATUS access_resource( HMODULE hmod, const IMAGE_RESOURCE_DATA_
{
{
if
(
ptr
)
if
(
ptr
)
{
{
if
(
is_data_file_module
(
hmod
))
BOOL
is_data_file
=
is_data_file_module
(
hmod
);
{
hmod
=
(
HMODULE
)((
ULONG_PTR
)
hmod
&
~
3
);
HMODULE
mod
=
(
HMODULE
)((
ULONG_PTR
)
hmod
&
~
1
);
if
(
is_data_file
)
*
ptr
=
RtlImageRvaToVa
(
RtlImageNtHeader
(
mod
),
mod
,
entry
->
OffsetToData
,
NULL
);
*
ptr
=
RtlImageRvaToVa
(
RtlImageNtHeader
(
hmod
),
h
mod
,
entry
->
OffsetToData
,
NULL
);
}
else
else
*
ptr
=
(
char
*
)
hmod
+
entry
->
OffsetToData
;
*
ptr
=
(
char
*
)
hmod
+
entry
->
OffsetToData
;
}
}
if
(
size
)
*
size
=
entry
->
Size
;
if
(
size
)
*
size
=
entry
->
Size
;
status
=
STATUS_SUCCESS
;
status
=
STATUS_SUCCESS
;
...
...
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