Bugfix: dwFlags must describe target process in UserSignalProc.

This commit is contained in:
Ulrich Weigand 1999-05-23 09:31:49 +00:00 committed by Alexandre Julliard
parent beed983be6
commit 158f00ed8d
1 changed files with 19 additions and 12 deletions

View File

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