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
4880a5a0
Commit
4880a5a0
authored
Feb 09, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Pass a flag instead of a file handle to load_builtin_dll().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
340d0106
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
loader.c
dlls/ntdll/loader.c
+7
-7
No files found.
dlls/ntdll/loader.c
View file @
4880a5a0
...
...
@@ -2127,7 +2127,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam
/***********************************************************************
* load_builtin_dll
*/
static
NTSTATUS
load_builtin_dll
(
LPCWSTR
load_path
,
const
UNICODE_STRING
*
nt_name
,
HANDLE
file
,
static
NTSTATUS
load_builtin_dll
(
LPCWSTR
load_path
,
const
UNICODE_STRING
*
nt_name
,
BOOL
has_
file
,
DWORD
flags
,
WINE_MODREF
**
pwm
)
{
char
error
[
256
],
dllname
[
MAX_PATH
];
...
...
@@ -2151,7 +2151,7 @@ static NTSTATUS load_builtin_dll( LPCWSTR load_path, const UNICODE_STRING *nt_na
info
.
status
=
STATUS_SUCCESS
;
info
.
wm
=
NULL
;
if
(
file
)
/* we have a real file, try to load it */
if
(
has_
file
)
/* we have a real file, try to load it */
{
ANSI_STRING
unix_name
;
...
...
@@ -2565,19 +2565,19 @@ static NTSTATUS load_dll( LPCWSTR load_path, LPCWSTR libname, DWORD flags, WINE_
nts
=
load_native_dll
(
load_path
,
&
nt_name
,
handle
,
flags
,
pwm
,
&
st
);
if
(
nts
==
STATUS_INVALID_IMAGE_NOT_MZ
)
/* not in PE format, maybe it's a builtin */
nts
=
load_builtin_dll
(
load_path
,
&
nt_name
,
handle
,
flags
,
pwm
);
nts
=
load_builtin_dll
(
load_path
,
&
nt_name
,
TRUE
,
flags
,
pwm
);
}
if
(
nts
==
STATUS_DLL_NOT_FOUND
&&
loadorder
==
LO_NATIVE_BUILTIN
)
nts
=
load_builtin_dll
(
load_path
,
&
nt_name
,
0
,
flags
,
pwm
);
nts
=
load_builtin_dll
(
load_path
,
&
nt_name
,
FALSE
,
flags
,
pwm
);
break
;
case
LO_BUILTIN
:
case
LO_BUILTIN_NATIVE
:
case
LO_DEFAULT
:
/* default is builtin,native */
nts
=
load_builtin_dll
(
load_path
,
&
nt_name
,
handle
,
flags
,
pwm
);
nts
=
load_builtin_dll
(
load_path
,
&
nt_name
,
handle
!=
0
,
flags
,
pwm
);
if
(
!
handle
)
break
;
/* nothing else we can try */
/* file is not a builtin library, try without using the specified file */
if
(
nts
!=
STATUS_SUCCESS
)
nts
=
load_builtin_dll
(
load_path
,
&
nt_name
,
0
,
flags
,
pwm
);
nts
=
load_builtin_dll
(
load_path
,
&
nt_name
,
FALSE
,
flags
,
pwm
);
if
(
nts
==
STATUS_SUCCESS
&&
loadorder
==
LO_DEFAULT
&&
(
MODULE_InitDLL
(
*
pwm
,
DLL_WINE_PREATTACH
,
NULL
)
!=
STATUS_SUCCESS
))
{
...
...
@@ -3576,7 +3576,7 @@ void __wine_process_init(void)
wine_dll_set_callback
(
load_builtin_callback
);
RtlInitUnicodeString
(
&
nt_name
,
kernel32W
);
if
((
status
=
load_builtin_dll
(
NULL
,
&
nt_name
,
0
,
0
,
&
wm
))
!=
STATUS_SUCCESS
)
if
((
status
=
load_builtin_dll
(
NULL
,
&
nt_name
,
FALSE
,
0
,
&
wm
))
!=
STATUS_SUCCESS
)
{
MESSAGE
(
"wine: could not load kernel32.dll, status %x
\n
"
,
status
);
exit
(
1
);
...
...
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