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
e8ec7a8c
Commit
e8ec7a8c
authored
Mar 26, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Don't pass the application name to get_load_order().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4e2bd548
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
12 deletions
+10
-12
loader.c
dlls/ntdll/loader.c
+1
-3
loader.c
dlls/ntdll/unix/loader.c
+1
-5
loadorder.c
dlls/ntdll/unix/loadorder.c
+5
-1
unix_private.h
dlls/ntdll/unix/unix_private.h
+1
-1
unixlib.h
dlls/ntdll/unixlib.h
+2
-2
No files found.
dlls/ntdll/loader.c
View file @
e8ec7a8c
...
...
@@ -2691,7 +2691,6 @@ static NTSTATUS load_dll( const WCHAR *load_path, const WCHAR *libname, const WC
DWORD
flags
,
WINE_MODREF
**
pwm
)
{
enum
loadorder
loadorder
;
WINE_MODREF
*
main_exe
;
UNICODE_STRING
nt_name
;
struct
file_id
id
;
HANDLE
mapping
=
0
;
...
...
@@ -2716,8 +2715,7 @@ static NTSTATUS load_dll( const WCHAR *load_path, const WCHAR *libname, const WC
if
(
nts
&&
nts
!=
STATUS_DLL_NOT_FOUND
&&
nts
!=
STATUS_INVALID_IMAGE_NOT_MZ
)
goto
done
;
main_exe
=
get_modref
(
NtCurrentTeb
()
->
Peb
->
ImageBaseAddress
);
loadorder
=
unix_funcs
->
get_load_order
(
main_exe
?
main_exe
->
ldr
.
BaseDllName
.
Buffer
:
NULL
,
&
nt_name
);
loadorder
=
unix_funcs
->
get_load_order
(
&
nt_name
);
prev
=
NtCurrentTeb
()
->
Tib
.
ArbitraryUserPointer
;
NtCurrentTeb
()
->
Tib
.
ArbitraryUserPointer
=
nt_name
.
Buffer
+
4
;
...
...
dlls/ntdll/unix/loader.c
View file @
e8ec7a8c
...
...
@@ -1395,13 +1395,9 @@ NTSTATUS load_builtin( const pe_image_info_t *image_info, const WCHAR *filename,
UNICODE_STRING
nt_name
;
SECTION_IMAGE_INFORMATION
info
;
enum
loadorder
loadorder
;
const
WCHAR
*
app_name
=
NULL
;
if
(
NtCurrentTeb
()
->
Peb
->
ImageBaseAddress
)
app_name
=
NtCurrentTeb
()
->
Peb
->
ProcessParameters
->
ImagePathName
.
Buffer
;
init_unicode_string
(
&
nt_name
,
filename
);
loadorder
=
get_load_order
(
app_name
,
&
nt_name
);
loadorder
=
get_load_order
(
&
nt_name
);
if
(
image_info
->
image_flags
&
IMAGE_FLAGS_WineBuiltin
)
{
...
...
dlls/ntdll/unix/loadorder.c
View file @
e8ec7a8c
...
...
@@ -378,15 +378,19 @@ static enum loadorder get_load_order_value( HANDLE std_key, HANDLE app_key, WCHA
* Return the loadorder of a module.
* The system directory and '.dll' extension is stripped from the path.
*/
enum
loadorder
CDECL
get_load_order
(
const
WCHAR
*
app_name
,
const
UNICODE_STRING
*
nt_name
)
enum
loadorder
CDECL
get_load_order
(
const
UNICODE_STRING
*
nt_name
)
{
static
const
WCHAR
prefixW
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
};
enum
loadorder
ret
=
LO_INVALID
;
HANDLE
std_key
,
app_key
=
0
;
const
WCHAR
*
path
=
nt_name
->
Buffer
;
const
WCHAR
*
app_name
=
NULL
;
WCHAR
*
module
,
*
basename
;
int
len
;
if
(
NtCurrentTeb
()
->
Peb
->
ImageBaseAddress
)
app_name
=
NtCurrentTeb
()
->
Peb
->
ProcessParameters
->
ImagePathName
.
Buffer
;
if
(
!
init_done
)
init_load_order
();
std_key
=
get_standard_key
();
if
(
app_name
)
app_key
=
get_app_key
(
app_name
);
...
...
dlls/ntdll/unix/unix_private.h
View file @
e8ec7a8c
...
...
@@ -400,7 +400,7 @@ static inline void context_init_xstate( CONTEXT *context, void *xstate_buffer )
}
#endif
extern
enum
loadorder
CDECL
get_load_order
(
const
WCHAR
*
app_name
,
const
UNICODE_STRING
*
nt_name
)
DECLSPEC_HIDDEN
;
extern
enum
loadorder
CDECL
get_load_order
(
const
UNICODE_STRING
*
nt_name
)
DECLSPEC_HIDDEN
;
static
inline
size_t
ntdll_wcslen
(
const
WCHAR
*
str
)
{
...
...
dlls/ntdll/unixlib.h
View file @
e8ec7a8c
...
...
@@ -37,7 +37,7 @@ enum loadorder
};
/* increment this when you change the function table */
#define NTDLL_UNIXLIB_VERSION 11
8
#define NTDLL_UNIXLIB_VERSION 11
9
struct
unix_funcs
{
...
...
@@ -91,7 +91,7 @@ struct unix_funcs
NTSTATUS
(
CDECL
*
init_unix_lib
)(
void
*
module
,
DWORD
reason
,
const
void
*
ptr_in
,
void
*
ptr_out
);
NTSTATUS
(
CDECL
*
unwind_builtin_dll
)(
ULONG
type
,
struct
_DISPATCHER_CONTEXT
*
dispatch
,
CONTEXT
*
context
);
enum
loadorder
(
CDECL
*
get_load_order
)(
const
WCHAR
*
app_name
,
const
UNICODE_STRING
*
nt_name
);
enum
loadorder
(
CDECL
*
get_load_order
)(
const
UNICODE_STRING
*
nt_name
);
/* debugging functions */
unsigned
char
(
CDECL
*
dbg_get_channel_flags
)(
struct
__wine_debug_channel
*
channel
);
...
...
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