Commit e24b1624 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Pass an NT filename to get_load_order().

parent 3099b04a
......@@ -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 ))
{
......
......@@ -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));
......
......@@ -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
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment