ntdll: Support device paths in LdrGetDllPath.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48698 Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d0f4487c61
commit
1a05b7da63
|
@ -2635,6 +2635,24 @@ static void test_LdrGetDllPath(void)
|
|||
ret = pLdrGetDllPath( fooW, LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR, &path, &unknown_ptr );
|
||||
ok( ret == STATUS_INVALID_PARAMETER, "LdrGetDllPath failed %x\n", ret );
|
||||
|
||||
lstrcpyW( buffer, L"\\\\?\\" );
|
||||
lstrcatW( buffer, dlldir );
|
||||
p = buffer + lstrlenW(buffer);
|
||||
*p++ = '\\';
|
||||
lstrcpyW( p, fooW );
|
||||
ret = pLdrGetDllPath( buffer, LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR, &path, &unknown_ptr );
|
||||
ok( !ret, "LdrGetDllPath failed %x\n", ret );
|
||||
ok( !unknown_ptr, "unknown ptr %p\n", unknown_ptr );
|
||||
ok( !memcmp( path, L"\\\\?\\", 4 * sizeof(WCHAR) ) && path_equal( path + 4, dlldir ),
|
||||
"got %s expected \\\\?\\%s\n", wine_dbgstr_w(path), wine_dbgstr_w(dlldir));
|
||||
pRtlReleasePath( path );
|
||||
|
||||
ret = pLdrGetDllPath( L"\\\\?\\c:\\test.dll", LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR, &path, &unknown_ptr );
|
||||
ok( !ret, "LdrGetDllPath failed %x\n", ret );
|
||||
ok( !unknown_ptr, "unknown ptr %p\n", unknown_ptr );
|
||||
ok( !lstrcmpW( path, L"\\\\?\\c:" ), "got %s expected \\\\?\\c:\n", wine_dbgstr_w(path));
|
||||
pRtlReleasePath( path );
|
||||
|
||||
lstrcpyW( buffer, dlldir );
|
||||
p = buffer + lstrlenW(buffer);
|
||||
*p++ = '\\';
|
||||
|
|
|
@ -2204,7 +2204,7 @@ static NTSTATUS get_dll_load_path_search_flags( LPCWSTR module, DWORD flags, WCH
|
|||
if (flags & LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR)
|
||||
{
|
||||
DWORD type = RtlDetermineDosPathNameType_U( module );
|
||||
if (type != ABSOLUTE_DRIVE_PATH && type != ABSOLUTE_PATH)
|
||||
if (type != ABSOLUTE_DRIVE_PATH && type != ABSOLUTE_PATH && type != DEVICE_PATH)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
mod_end = get_module_path_end( module );
|
||||
len += (mod_end - module) + 1;
|
||||
|
|
Loading…
Reference in New Issue