Match RaiseException and EXCEPTION_RECORD to SDK definitions.

This commit is contained in:
Dmitry Timoshkov 2005-02-24 13:15:36 +00:00 committed by Alexandre Julliard
parent 29d7b8170b
commit 0497af09a7
10 changed files with 17 additions and 17 deletions

View File

@ -66,7 +66,7 @@ typedef INT (WINAPI *MessageBoxW_funcptr)(HWND,LPCWSTR,LPCWSTR,UINT);
/*******************************************************************
* RaiseException (KERNEL32.@)
*/
void WINAPI RaiseException( DWORD code, DWORD flags, DWORD nbargs, const LPDWORD args )
void WINAPI RaiseException( DWORD code, DWORD flags, DWORD nbargs, const ULONG_PTR *args )
{
EXCEPTION_RECORD record;

View File

@ -264,7 +264,7 @@ NTSTATUS WINAPI RtlpWaitForCriticalSection( RTL_CRITICAL_SECTION *crit )
rec.ExceptionRecord = NULL;
rec.ExceptionAddress = RtlRaiseException; /* sic */
rec.NumberParameters = 1;
rec.ExceptionInformation[0] = (DWORD)crit;
rec.ExceptionInformation[0] = (ULONG_PTR)crit;
RtlRaiseException( &rec );
}
}

View File

@ -266,7 +266,7 @@ void WINAPI EXC_RtlRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context )
/* Check frame address */
if (((void*)frame < NtCurrentTeb()->Tib.StackLimit) ||
((void*)(frame+1) > NtCurrentTeb()->Tib.StackBase) ||
(int)frame & 3)
(ULONG_PTR)frame & 3)
{
rec->ExceptionFlags |= EH_STACK_INVALID;
break;

View File

@ -178,8 +178,8 @@ static void stub_entry_point( const char *dll, const char *name, ... )
rec.ExceptionAddress = *((void **)&dll - 1);
#endif
rec.NumberParameters = 2;
rec.ExceptionInformation[0] = (DWORD)dll;
rec.ExceptionInformation[1] = (DWORD)name;
rec.ExceptionInformation[0] = (ULONG_PTR)dll;
rec.ExceptionInformation[1] = (ULONG_PTR)name;
for (;;) RtlRaiseException( &rec );
}

View File

@ -1022,7 +1022,7 @@ static HANDLER_DEF(segv_handler)
#ifdef FAULT_ADDRESS
rec->NumberParameters = 2;
rec->ExceptionInformation[0] = (get_error_code(HANDLER_CONTEXT) & 2) != 0;
rec->ExceptionInformation[1] = (DWORD)FAULT_ADDRESS;
rec->ExceptionInformation[1] = (ULONG_PTR)FAULT_ADDRESS;
#endif
break;
case T_ALIGNFLT: /* Alignment check exception */

View File

@ -317,7 +317,7 @@ static void do_segv( CONTEXT *context, int trap, int err, int code, void * addr
case SEGV_ACCERR:
rec.NumberParameters = 2;
rec.ExceptionInformation[0] = 0; /* FIXME ? */
rec.ExceptionInformation[1] = (DWORD)addr;
rec.ExceptionInformation[1] = (ULONG_PTR)addr;
if (!(page_fault_code=VIRTUAL_HandleFault(addr)))
return;
rec.ExceptionCode = page_fault_code;
@ -339,7 +339,7 @@ static void do_segv( CONTEXT *context, int trap, int err, int code, void * addr
/* FIXME: correct for all cases ? */
rec.NumberParameters = 2;
rec.ExceptionInformation[0] = 0; /* FIXME ? */
rec.ExceptionInformation[1] = (DWORD)addr;
rec.ExceptionInformation[1] = (ULONG_PTR)addr;
if (!(page_fault_code=VIRTUAL_HandleFault(addr)))
return;
rec.ExceptionCode = page_fault_code;

View File

@ -171,7 +171,7 @@ static void segv_handler( int signal, siginfo_t *info, ucontext_t *ucontext )
rec.ExceptionAddress = (LPVOID)context.pc;
rec.NumberParameters = 2;
rec.ExceptionInformation[0] = 0; /* FIXME: read/write access ? */
rec.ExceptionInformation[1] = (DWORD)info->si_addr;
rec.ExceptionInformation[1] = (ULONG_PTR)info->si_addr;
EXC_RtlRaiseException( &rec, &context );
restore_context( &context, ucontext );

View File

@ -374,10 +374,10 @@ static void test_pack_EXCEPTION_RECORD(void)
TEST_TYPE(EXCEPTION_RECORD, 80, 4);
TEST_FIELD(EXCEPTION_RECORD, DWORD, ExceptionCode, 0, 4, 4);
TEST_FIELD(EXCEPTION_RECORD, DWORD, ExceptionFlags, 4, 4, 4);
TEST_FIELD(EXCEPTION_RECORD, struct __EXCEPTION_RECORD *, ExceptionRecord, 8, 4, 4);
TEST_FIELD(EXCEPTION_RECORD, LPVOID, ExceptionAddress, 12, 4, 4);
TEST_FIELD(EXCEPTION_RECORD, struct _EXCEPTION_RECORD *, ExceptionRecord, 8, 4, 4);
TEST_FIELD(EXCEPTION_RECORD, PVOID, ExceptionAddress, 12, 4, 4);
TEST_FIELD(EXCEPTION_RECORD, DWORD, NumberParameters, 16, 4, 4);
TEST_FIELD(EXCEPTION_RECORD, DWORD[EXCEPTION_MAXIMUM_PARAMETERS], ExceptionInformation, 20, 60, 4);
TEST_FIELD(EXCEPTION_RECORD, ULONG_PTR[EXCEPTION_MAXIMUM_PARAMETERS], ExceptionInformation, 20, 60, 4);
}
static void test_pack_EXECUTION_STATE(void)

View File

@ -1600,7 +1600,7 @@ DWORD WINAPI QueryDosDeviceW(LPCWSTR,LPWSTR,DWORD);
BOOL WINAPI QueryPerformanceCounter(LARGE_INTEGER*);
BOOL WINAPI QueryPerformanceFrequency(LARGE_INTEGER*);
DWORD WINAPI QueueUserAPC(PAPCFUNC,HANDLE,ULONG_PTR);
void WINAPI RaiseException(DWORD,DWORD,DWORD,const LPDWORD);
void WINAPI RaiseException(DWORD,DWORD,DWORD,const ULONG_PTR *);
BOOL WINAPI ReadEventLogA(HANDLE,DWORD,DWORD,LPVOID,DWORD,DWORD *,DWORD *);
BOOL WINAPI ReadEventLogW(HANDLE,DWORD,DWORD,LPVOID,DWORD,DWORD *,DWORD *);
#define ReadEventLog WINELIB_NAME_AW(ReadEventLog)

View File

@ -1494,15 +1494,15 @@ typedef CONTEXT *PCONTEXT;
#define EXCEPTION_MAXIMUM_PARAMETERS 15
typedef struct __EXCEPTION_RECORD
typedef struct _EXCEPTION_RECORD
{
DWORD ExceptionCode;
DWORD ExceptionFlags;
struct __EXCEPTION_RECORD *ExceptionRecord;
struct _EXCEPTION_RECORD *ExceptionRecord;
LPVOID ExceptionAddress;
PVOID ExceptionAddress;
DWORD NumberParameters;
DWORD ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
} EXCEPTION_RECORD, *PEXCEPTION_RECORD;
/*