Commit 158f00ed authored by Ulrich Weigand's avatar Ulrich Weigand Committed by Alexandre Julliard

Bugfix: dwFlags must describe target process in UserSignalProc.

parent beed983b
......@@ -178,12 +178,29 @@ PDB *PROCESS_IdToPDB( DWORD id )
*/
void PROCESS_CallUserSignalProc( UINT uCode, DWORD dwThreadOrProcessId, HMODULE hModule )
{
PDB *pdb = PROCESS_Current();
STARTUPINFOA *startup = pdb->env_db? pdb->env_db->startup_info : NULL;
PDB *pdb;
STARTUPINFOA *startup;
DWORD dwFlags = 0;
/* Get thread or process ID */
if ( dwThreadOrProcessId == 0 )
{
if ( uCode == USIG_THREAD_INIT || uCode == USIG_THREAD_EXIT )
dwThreadOrProcessId = GetCurrentThreadId();
else
dwThreadOrProcessId = GetCurrentProcessId();
}
/* Determine dwFlags */
if ( uCode == USIG_THREAD_INIT || uCode == USIG_THREAD_EXIT )
pdb = PROCESS_Current();
else
pdb = PROCESS_IdToPDB( dwThreadOrProcessId );
startup = pdb->env_db? pdb->env_db->startup_info : NULL;
if ( !(pdb->flags & PDB32_WIN16_PROC) )
dwFlags |= USIG_FLAGS_WIN32;
......@@ -203,16 +220,6 @@ void PROCESS_CallUserSignalProc( UINT uCode, DWORD dwThreadOrProcessId, HMODULE
dwFlags |= USIG_FLAGS_FEEDBACK;
}
/* Get thread or process ID */
if ( dwThreadOrProcessId == 0 )
{
if ( uCode == USIG_THREAD_INIT || uCode == USIG_THREAD_EXIT )
dwThreadOrProcessId = GetCurrentThreadId();
else
dwThreadOrProcessId = GetCurrentProcessId();
}
/* Convert module handle to 16-bit */
if ( HIWORD( hModule ) )
......
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