user32: Fix DLL injection problem using LOAD_WITH_ALTERED_SEARCH_PATH.

This commit is contained in:
Hongbo Ni 2009-08-27 11:18:14 +10:00 committed by Alexandre Julliard
parent 4b8adbef86
commit 650a0f3fdd
1 changed files with 1 additions and 1 deletions

View File

@ -322,7 +322,7 @@ void *get_hook_proc( void *proc, const WCHAR *module )
{
TRACE( "loading %s\n", debugstr_w(module) );
/* FIXME: the library will never be freed */
if (!(mod = LoadLibraryW(module))) return NULL;
if (!(mod = LoadLibraryExW(module, NULL, LOAD_WITH_ALTERED_SEARCH_PATH))) return NULL;
}
return (char *)mod + (ULONG_PTR)proc;
}