Make relay and snooping work for LoadLibrary+GetProcAddress sequence

(based on a patch by Dmitry Timoshkov).
oldstable
Alexandre Julliard 2004-08-02 22:25:01 +00:00
parent fbf003dd39
commit 60f0439ba6
2 changed files with 7 additions and 6 deletions

View File

@ -305,15 +305,15 @@ static FARPROC find_ordinal_export( HMODULE module, const IMAGE_EXPORT_DIRECTORY
((const char *)proc < (const char *)exports + exp_size))
return find_forwarded_export( module, (const char *)proc );
if (TRACE_ON(snoop) && current_modref)
if (TRACE_ON(snoop))
{
proc = SNOOP_GetProcAddress( module, exports, exp_size, proc, ordinal,
current_modref->ldr.BaseDllName.Buffer );
const WCHAR *user = current_modref ? current_modref->ldr.BaseDllName.Buffer : NULL;
proc = SNOOP_GetProcAddress( module, exports, exp_size, proc, ordinal, user );
}
if (TRACE_ON(relay) && current_modref)
if (TRACE_ON(relay))
{
proc = RELAY_GetProcAddress( module, exports, exp_size, proc,
current_modref->ldr.BaseDllName.Buffer );
const WCHAR *user = current_modref ? current_modref->ldr.BaseDllName.Buffer : NULL;
proc = RELAY_GetProcAddress( module, exports, exp_size, proc, user );
}
return proc;
}

View File

@ -332,6 +332,7 @@ static BOOL check_from_module( const WCHAR **includelist, const WCHAR **excludel
const WCHAR **listitem;
BOOL show;
if (!module) return TRUE;
if (!includelist && !excludelist) return TRUE;
if (excludelist)
{