Commit ae964ac8 authored by Alexandre Julliard's avatar Alexandre Julliard

Take advantage of the __EXCEPT_PAGE_FAULT macro.

parent 324d86a3
......@@ -313,14 +313,6 @@ static BOOL WINAPI CRYPT_SetCertificateContextProperty(
static const void * WINAPI CRYPT_ReadSerializedElement(const BYTE *pbElement,
DWORD cbElement, DWORD dwContextTypeFlags, DWORD *pdwContentType);
/* filter for page-fault exceptions */
static WINE_EXCEPTION_FILTER(page_fault)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
static void CRYPT_InitStore(WINECRYPT_CERTSTORE *store, HCRYPTPROV hCryptProv,
DWORD dwFlags, CertStoreType type)
{
......@@ -2787,7 +2779,7 @@ static const void * WINAPI CRYPT_ReadSerializedElement(const BYTE *pbElement,
}
}
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
SetLastError(STATUS_ACCESS_VIOLATION);
context = NULL;
......
......@@ -66,13 +66,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_msc);
* Debug file access helper routines
*/
static WINE_EXCEPTION_FILTER(page_fault)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
static void dump(const void* ptr, unsigned len)
{
int i, j;
......@@ -2334,7 +2327,7 @@ typedef struct _FPO_DATA
#endif
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
ERR("Got a page fault while loading symbols\n");
ret = FALSE;
......
......@@ -64,14 +64,6 @@ void (*wine_tsx11_unlock_ptr)(void) = NULL;
WINE_DEFAULT_DEBUG_CHANNEL(ddraw);
/* filter for page-fault exceptions */
static WINE_EXCEPTION_FILTER(page_fault)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
/**********************************************************************/
typedef struct {
......@@ -221,7 +213,7 @@ HRESULT WINAPI DirectDrawEnumerateExA(
lpContext, 0))
stop = TRUE;
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
return E_INVALIDARG;
}
......
......@@ -45,14 +45,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(atom);
#define MAX_ATOM_LEN 255
/* filter for page-fault exceptions */
static WINE_EXCEPTION_FILTER(page_fault)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
/******************************************************************
* get_local_table
*
......@@ -143,7 +135,7 @@ ATOM WINAPI GlobalAddAtomA( LPCSTR str /* [in] String to add */ )
}
}
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
atom = 0;
......
......@@ -63,14 +63,6 @@ static const char default_ComputerName[] = "WINE";
#define IS_OPTION_TRUE(ch) ((ch) == 'y' || (ch) == 'Y' || (ch) == 't' || (ch) == 'T' || (ch) == '1')
/* filter for page-fault exceptions */
static WINE_EXCEPTION_FILTER(page_fault)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
/***********************************************************************
* dns_gethostbyname (INTERNAL)
*
......@@ -359,7 +351,7 @@ BOOL WINAPI GetComputerNameW(LPWSTR name,LPDWORD size)
st = STATUS_SUCCESS;
}
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
st = STATUS_INVALID_PARAMETER;
}
......@@ -410,7 +402,7 @@ BOOL WINAPI GetComputerNameA(LPSTR name, LPDWORD size)
ret = TRUE;
}
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
ret = FALSE;
......@@ -471,7 +463,7 @@ BOOL WINAPI GetComputerNameExA(COMPUTER_NAME_FORMAT type, LPSTR name, LPDWORD si
ret = TRUE;
}
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
......@@ -536,7 +528,7 @@ BOOL WINAPI GetComputerNameExW( COMPUTER_NAME_FORMAT type, LPWSTR name, LPDWORD
ret = TRUE;
}
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
......
......@@ -72,13 +72,6 @@ typedef struct
static BOOL oem_file_apis;
static WINE_EXCEPTION_FILTER(page_fault)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
/***********************************************************************
* create_file_OF
......@@ -1724,7 +1717,7 @@ BOOL WINAPI FindClose( HANDLE handle )
}
}
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
WARN("Illegal handle %p\n", handle);
SetLastError( ERROR_INVALID_HANDLE );
......
......@@ -70,18 +70,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(heap);
static HANDLE systemHeap; /* globally shared heap */
/* filter for page-fault exceptions */
static WINE_EXCEPTION_FILTER(page_fault)
{
switch (GetExceptionCode()) {
case (EXCEPTION_ACCESS_VIOLATION):
return EXCEPTION_EXECUTE_HANDLER;
default:
return EXCEPTION_CONTINUE_SEARCH;
}
}
/***********************************************************************
* HEAP_CreateSystemHeap
*
......@@ -436,7 +424,7 @@ LPVOID WINAPI GlobalLock(
SetLastError(ERROR_INVALID_HANDLE);
}
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
WARN("page fault on %p\n", hmem);
palloc = NULL;
......@@ -484,7 +472,7 @@ BOOL WINAPI GlobalUnlock(
locked=FALSE;
}
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
ERR("page fault occurred ! Caused by bug ?\n");
SetLastError( ERROR_INVALID_PARAMETER );
......@@ -546,7 +534,7 @@ HGLOBAL WINAPI GlobalHandle(
handle = 0;
SetLastError( ERROR_INVALID_HANDLE );
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_HANDLE );
handle = 0;
......@@ -717,7 +705,7 @@ HGLOBAL WINAPI GlobalFree(
}
}
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
ERR("page fault occurred ! Caused by bug ?\n");
SetLastError( ERROR_INVALID_PARAMETER );
......
......@@ -90,14 +90,6 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_
static HMODULE16 NE_GetModuleByFilename( LPCSTR name );
static WINE_EXCEPTION_FILTER(page_fault)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
/* patch all the flat cs references of the code segment if necessary */
inline static void patch_code_segment( NE_MODULE *pModule )
{
......@@ -1373,7 +1365,7 @@ static BOOL16 MODULE_CallWEP( HMODULE16 hModule )
WOWCallback16Ex( (DWORD)WEP, WCB16_PASCAL, sizeof(args), args, &dwRet );
ret = LOWORD(dwRet);
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
WARN("Page fault\n");
ret = 0;
......
......@@ -48,13 +48,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(resource);
#define HGLOBAL_16(h32) (LOWORD(h32))
#define HMODULE_16(h32) (LOWORD(h32))
static WINE_EXCEPTION_FILTER(page_fault)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
/* retrieve the resource name to pass to the ntdll functions */
static NTSTATUS get_res_nameA( LPCSTR name, UNICODE_STRING *str )
{
......@@ -121,7 +114,7 @@ static BOOL get_res_name_type_WtoA( LPCWSTR name, LPCWSTR type, LPSTR *nameA, LP
}
else *typeA = (LPSTR)type;
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
if (HIWORD(*nameA)) HeapFree( GetProcessHeap(), 0, *nameA );
if (HIWORD(*typeA)) HeapFree( GetProcessHeap(), 0, *typeA );
......@@ -151,7 +144,7 @@ static HRSRC find_resourceA( HMODULE hModule, LPCSTR type, LPCSTR name, WORD lan
done:
if (status != STATUS_SUCCESS) SetLastError( RtlNtStatusToDosError(status) );
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
}
......@@ -184,7 +177,7 @@ static HRSRC find_resourceW( HMODULE hModule, LPCWSTR type, LPCWSTR name, WORD l
done:
if (status != STATUS_SUCCESS) SetLastError( RtlNtStatusToDosError(status) );
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
}
......
......@@ -39,14 +39,6 @@
static INT (WINAPI *pLoadStringA)(HINSTANCE, UINT, LPSTR, INT);
static INT (WINAPI *pwvsprintfA)(LPSTR, LPCSTR, va_list);
/* filter for page-fault exceptions */
static WINE_EXCEPTION_FILTER(page_fault)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
/***********************************************************************
* Helper for k32 family functions
......@@ -179,7 +171,7 @@ LPSTR WINAPI lstrcatA( LPSTR dst, LPCSTR src )
{
strcat( dst, src );
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
return NULL;
......@@ -198,7 +190,7 @@ LPWSTR WINAPI lstrcatW( LPWSTR dst, LPCWSTR src )
{
strcatW( dst, src );
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
return NULL;
......@@ -244,7 +236,7 @@ LPSTR WINAPI lstrcpyA( LPSTR dst, LPCSTR src )
/* this is how Windows does it */
memmove( dst, src, strlen(src)+1 );
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
return NULL;
......@@ -263,7 +255,7 @@ LPWSTR WINAPI lstrcpyW( LPWSTR dst, LPCWSTR src )
{
strcpyW( dst, src );
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
return NULL;
......@@ -308,7 +300,7 @@ LPSTR WINAPI lstrcpynA( LPSTR dst, LPCSTR src, INT n )
}
if (count) *d = 0;
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
return 0;
......@@ -342,7 +334,7 @@ LPWSTR WINAPI lstrcpynW( LPWSTR dst, LPCWSTR src, INT n )
}
if (count) *d = 0;
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
return 0;
......@@ -372,7 +364,7 @@ INT WINAPI lstrlenA( LPCSTR str )
{
ret = strlen(str);
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
return 0;
......@@ -392,7 +384,7 @@ INT WINAPI lstrlenW( LPCWSTR str )
{
ret = strlenW(str);
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
return 0;
......
......@@ -50,14 +50,6 @@ WINE_DECLARE_DEBUG_CHANNEL(seh);
static unsigned int page_size;
/* filter for page-fault exceptions */
static WINE_EXCEPTION_FILTER(page_fault)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
/***********************************************************************
* VirtualAlloc (KERNEL32.@)
......@@ -557,7 +549,7 @@ BOOL WINAPI IsBadReadPtr(
dummy = p[0];
dummy = p[count - 1];
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
TRACE_(seh)("%p caused page fault during read\n", ptr);
return TRUE;
......@@ -598,7 +590,7 @@ BOOL WINAPI IsBadWritePtr(
p[0] |= 0;
p[count - 1] |= 0;
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
TRACE_(seh)("%p caused page fault during write\n", ptr);
return TRUE;
......@@ -677,7 +669,7 @@ BOOL WINAPI IsBadStringPtrA(
volatile const char *p = str;
while (p != str + max) if (!*p++) break;
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
TRACE_(seh)("%p caused page fault during read\n", str);
return TRUE;
......@@ -700,7 +692,7 @@ BOOL WINAPI IsBadStringPtrW( LPCWSTR str, UINT max )
volatile const WCHAR *p = str;
while (p != str + max) if (!*p++) break;
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
TRACE_(seh)("%p caused page fault during read\n", str);
return TRUE;
......
......@@ -127,14 +127,6 @@ static void dump_obj_locator( const rtti_object_locator *ptr )
}
}
/* filter for page-fault exceptions */
static WINE_EXCEPTION_FILTER(page_fault)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
/* Internal common ctor for exception */
static void WINAPI EXCEPTION_ctor(exception *_this, const char** name)
{
......@@ -1065,7 +1057,7 @@ const type_info* MSVCRT___RTtypeid(void *cppobj)
const rtti_object_locator *obj_locator = get_obj_locator( cppobj );
ret = obj_locator->type_descriptor;
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
__non_rtti_object e;
MSVCRT___non_rtti_object_ctor( &e, "Bad read pointer - no RTTI data!" );
......@@ -1150,7 +1142,7 @@ void* MSVCRT___RTDynamicCast(void *cppobj, int unknown,
_CxxThrowException( &e, &bad_cast_exception_type );
}
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
__non_rtti_object e;
MSVCRT___non_rtti_object_ctor( &e, "Access violation - no RTTI data!" );
......@@ -1189,7 +1181,7 @@ void* MSVCRT___RTCastToVoid(void *cppobj)
const rtti_object_locator *obj_locator = get_obj_locator( cppobj );
ret = (char *)cppobj - obj_locator->base_class_offset;
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
__non_rtti_object e;
MSVCRT___non_rtti_object_ctor( &e, "Access violation - no RTTI data!" );
......
......@@ -45,14 +45,6 @@ static struct __wine_debug_functions default_funcs;
/* ---------------------------------------------------------------------- */
/* filter for page-fault exceptions */
static WINE_EXCEPTION_FILTER(page_fault)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
/* get the debug info pointer for the current thread */
static inline struct debug_info *get_info(void)
{
......@@ -91,7 +83,7 @@ static const char *NTDLL_dbgstr_an( const char *src, int n )
{
res = default_funcs.dbgstr_an( src, n );
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
release_temp_buffer( old_pos, 0 );
return "(invalid)";
......@@ -114,7 +106,7 @@ static const char *NTDLL_dbgstr_wn( const WCHAR *src, int n )
{
res = default_funcs.dbgstr_wn( src, n );
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
release_temp_buffer( old_pos, 0 );
return "(invalid)";
......
......@@ -54,14 +54,6 @@ typedef DWORD (CALLBACK *DLLENTRYPROC)(HMODULE,DWORD,LPVOID);
static int process_detaching = 0; /* set on process detach to avoid deadlocks with thread detach */
static int free_lib_count; /* recursion depth of LdrUnloadDll calls */
/* filter for page-fault exceptions */
static WINE_EXCEPTION_FILTER(page_fault)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
static const char * const reason_names[] =
{
"PROCESS_DETACH",
......@@ -1937,7 +1929,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
if (ret->Signature != IMAGE_NT_SIGNATURE) ret = NULL;
}
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
return NULL;
}
......
......@@ -272,14 +272,6 @@ extern void WINAPI SNOOP_Return(void);
static SNOOP_DLL *firstdll;
static SNOOP_RETURNENTRIES *firstrets;
static WINE_EXCEPTION_FILTER(page_fault)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION ||
GetExceptionCode() == EXCEPTION_PRIV_INSTRUCTION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
/***********************************************************************
* check_list
*
......@@ -873,7 +865,7 @@ static void SNOOP_PrintArg(DWORD x)
if (!nostring && i > 5) DPRINTF(" %s",debugstr_wn((LPWSTR)x,i));
}
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
}
__ENDTRY
......
......@@ -51,13 +51,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(resource);
static LCID user_lcid, system_lcid;
static LANGID user_ui_language, system_ui_language;
static WINE_EXCEPTION_FILTER(page_fault)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
/**********************************************************************
* is_data_file_module
*
......@@ -281,7 +274,7 @@ NTSTATUS WINAPI LdrFindResourceDirectory_U( HMODULE hmod, const LDR_RESOURCE_INF
status = find_entry( hmod, info, level, &res, TRUE );
if (status == STATUS_SUCCESS) *dir = res;
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
return GetExceptionCode();
}
......@@ -309,7 +302,7 @@ NTSTATUS WINAPI LdrFindResource_U( HMODULE hmod, const LDR_RESOURCE_INFO *info,
status = find_entry( hmod, info, level, &res, FALSE );
if (status == STATUS_SUCCESS) *entry = res;
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
return GetExceptionCode();
}
......@@ -350,7 +343,7 @@ static inline NTSTATUS access_resource( HMODULE hmod, const IMAGE_RESOURCE_DATA_
status = STATUS_SUCCESS;
}
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
return GetExceptionCode();
}
......
......@@ -46,14 +46,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
#define NT_SUCCESS(status) (status == STATUS_SUCCESS)
/* filter for page-fault exceptions */
static WINE_EXCEPTION_FILTER(page_fault)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
/* helper function to copy an ACL */
static BOOLEAN copy_acl(DWORD nDestinationAclLength, PACL pDestinationAcl, PACL pSourceAcl)
{
......@@ -393,7 +385,7 @@ BOOLEAN WINAPI RtlValidSid( PSID pSid )
ret = FALSE;
}
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
WARN("(%p): invalid pointer!\n", pSid);
return FALSE;
......@@ -1268,7 +1260,7 @@ BOOLEAN WINAPI RtlValidAcl(PACL pAcl)
}
}
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
WARN("(%p): invalid pointer!\n", pAcl);
return 0;
......
......@@ -110,13 +110,6 @@ struct dispatch_params
HRESULT hr; /* hresult (out) */
};
static WINE_EXCEPTION_FILTER(ole_filter)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_CONTINUE_SEARCH;
return EXCEPTION_EXECUTE_HANDLER;
}
static HRESULT WINAPI RpcChannelBuffer_QueryInterface(LPRPCCHANNELBUFFER iface, REFIID riid, LPVOID *ppv)
{
*ppv = NULL;
......@@ -453,7 +446,7 @@ void RPC_ExecuteCall(struct dispatch_params *params)
{
params->hr = IRpcStubBuffer_Invoke(params->stub, params->msg, params->chan);
}
__EXCEPT(ole_filter)
__EXCEPT_PAGE_FAULT
{
params->hr = GetExceptionCode();
}
......
......@@ -2202,17 +2202,6 @@ end:
*
* See LoadImageW.
*/
/* filter for page-fault exceptions */
static WINE_EXCEPTION_FILTER(page_fault)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
/*********************************************************************/
HANDLE WINAPI LoadImageA( HINSTANCE hinst, LPCSTR name, UINT type,
INT desiredx, INT desiredy, UINT loadflags)
{
......@@ -2227,7 +2216,7 @@ HANDLE WINAPI LoadImageA( HINSTANCE hinst, LPCSTR name, UINT type,
u_name = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, name, -1, u_name, len );
}
__EXCEPT(page_fault) {
__EXCEPT_PAGE_FAULT {
SetLastError( ERROR_INVALID_PARAMETER );
return 0;
}
......
......@@ -42,13 +42,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(resource);
/* filter for page-fault exceptions */
static WINE_EXCEPTION_FILTER(page_fault)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
/***********************************************************************
* CharNextA (USER32.@)
......@@ -253,7 +246,7 @@ LPSTR WINAPI CharLowerA(LPSTR str)
{
CharLowerBuffA( str, strlen(str) );
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
return NULL;
......@@ -279,7 +272,7 @@ LPSTR WINAPI CharUpperA(LPSTR str)
{
CharUpperBuffA( str, strlen(str) );
}
__EXCEPT(page_fault)
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
return NULL;
......
......@@ -82,7 +82,7 @@ LPWINE_DRIVER DRIVER_FindFromHDrvr(HDRVR hDrvr)
d = (LPWINE_DRIVER)hDrvr;
if (d && d->dwMagic != WINE_DI_MAGIC) d = NULL;
}
__EXCEPT(NULL)
__EXCEPT_PAGE_FAULT
{
return NULL;
}
......
......@@ -447,7 +447,7 @@ LPWINE_MLD MMDRV_Get(HANDLE _hndl, UINT type, BOOL bCanBeID)
mld = MM_MLDrvs[idx];
if (mld && mld->type != type) mld = NULL;
}
__EXCEPT(NULL)
__EXCEPT_PAGE_FAULT
{
mld = NULL;
}
......
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