kernel32: Implement GetErrorMode/SetErrorMode on top of NTDLL.

This commit is contained in:
Juan Lang 2010-06-21 11:04:04 -07:00 committed by Alexandre Julliard
parent a4331aaf5d
commit 5e87ca772e
1 changed files with 11 additions and 5 deletions

View File

@ -70,8 +70,6 @@ typedef struct
DWORD dwReserved;
} LOADPARMS32;
static UINT process_error_mode;
static DWORD shutdown_flags = 0;
static DWORD shutdown_priority = 0x280;
static BOOL is_wow64;
@ -2450,8 +2448,12 @@ BOOL WINAPI GetExitCodeProcess( HANDLE hProcess, LPDWORD lpExitCode )
*/
UINT WINAPI SetErrorMode( UINT mode )
{
UINT old = process_error_mode;
process_error_mode = mode;
UINT old;
NtQueryInformationProcess( GetCurrentProcess(), ProcessDefaultHardErrorMode,
&old, sizeof(old), NULL );
NtSetInformationProcess( GetCurrentProcess(), ProcessDefaultHardErrorMode,
&mode, sizeof(mode) );
return old;
}
@ -2460,7 +2462,11 @@ UINT WINAPI SetErrorMode( UINT mode )
*/
UINT WINAPI GetErrorMode( void )
{
return process_error_mode;
UINT mode;
NtQueryInformationProcess( GetCurrentProcess(), ProcessDefaultHardErrorMode,
&mode, sizeof(mode), NULL );
return mode;
}
/**********************************************************************