ntdll: Pass an NT filename to get_load_order().

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-02-08 22:07:54 +01:00
parent 3099b04a89
commit e24b16247d
3 changed files with 6 additions and 3 deletions

View File

@ -2546,7 +2546,7 @@ static NTSTATUS load_dll( LPCWSTR load_path, LPCWSTR libname, DWORD flags, WINE_
filename = nt_name.Buffer + 4; /* \??\ prefix */
main_exe = get_modref( NtCurrentTeb()->Peb->ImageBaseAddress );
loadorder = get_load_order( main_exe ? main_exe->ldr.BaseDllName.Buffer : NULL, filename );
loadorder = get_load_order( main_exe ? main_exe->ldr.BaseDllName.Buffer : NULL, &nt_name );
if (handle && is_fake_dll( handle ))
{

View File

@ -429,16 +429,19 @@ static enum loadorder get_load_order_value( HANDLE std_key, HANDLE app_key, cons
* Return the loadorder of a module.
* The system directory and '.dll' extension is stripped from the path.
*/
enum loadorder get_load_order( const WCHAR *app_name, const WCHAR *path )
enum loadorder get_load_order( const WCHAR *app_name, const UNICODE_STRING *nt_name )
{
static const WCHAR nt_prefixW[] = {'\\','?','?','\\',0};
enum loadorder ret = LO_INVALID;
HANDLE std_key, app_key = 0;
const WCHAR *path = nt_name->Buffer;
WCHAR *module, *basename;
int len;
if (!init_done) init_load_order();
std_key = get_standard_key();
if (app_name) app_key = get_app_key( app_name );
if (!strncmpW( path, nt_prefixW, 4 )) path += 4;
TRACE("looking for %s\n", debugstr_w(path));

View File

@ -216,7 +216,7 @@ enum loadorder
LO_DEFAULT /* nothing specified, use default strategy */
};
extern enum loadorder get_load_order( const WCHAR *app_name, const WCHAR *path ) DECLSPEC_HIDDEN;
extern enum loadorder get_load_order( const WCHAR *app_name, const UNICODE_STRING *nt_name ) DECLSPEC_HIDDEN;
struct debug_info
{