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
9f4c4750
Commit
9f4c4750
authored
Mar 31, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Make sure that last error is set on LOAD_LIBRARY_AS_DATAFILE failure.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2a8a4cbb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
loader.c
dlls/kernelbase/loader.c
+5
-2
No files found.
dlls/kernelbase/loader.c
View file @
9f4c4750
...
...
@@ -95,7 +95,6 @@ static BOOL load_library_as_datafile( LPCWSTR load_path, DWORD flags, LPCWSTR na
file
=
CreateFileW
(
filenameW
,
GENERIC_READ
,
FILE_SHARE_READ
|
FILE_SHARE_DELETE
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
}
if
(
file
==
INVALID_HANDLE_VALUE
)
ERR
(
"can't load %s
\n
"
,
debugstr_w
(
name
));
if
(
file
==
INVALID_HANDLE_VALUE
)
return
FALSE
;
mapping
=
CreateFileMappingW
(
file
,
NULL
,
protect
,
0
,
0
,
NULL
);
...
...
@@ -108,7 +107,11 @@ static BOOL load_library_as_datafile( LPCWSTR load_path, DWORD flags, LPCWSTR na
if
(
!
(
flags
&
LOAD_LIBRARY_AS_IMAGE_RESOURCE
))
{
/* make sure it's a valid PE file */
if
(
!
RtlImageNtHeader
(
module
))
goto
failed
;
if
(
!
RtlImageNtHeader
(
module
))
{
SetLastError
(
ERROR_BAD_EXE_FORMAT
);
goto
failed
;
}
*
mod_ret
=
(
HMODULE
)((
char
*
)
module
+
1
);
/* set bit 0 for data file module */
if
(
flags
&
LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE
)
...
...
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