ntdll: Don't pass the application name to get_load_order().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4e2bd548b1
commit
e8ec7a8cec
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@ enum loadorder
|
|||
};
|
||||
|
||||
/* increment this when you change the function table */
|
||||
#define NTDLL_UNIXLIB_VERSION 118
|
||||
#define NTDLL_UNIXLIB_VERSION 119
|
||||
|
||||
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 );
|
||||
|
|
Loading…
Reference in New Issue