Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ae964ac8
Commit
ae964ac8
authored
Dec 16, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Take advantage of the __EXCEPT_PAGE_FAULT macro.
parent
324d86a3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
92 additions
and
261 deletions
+92
-261
cert.c
dlls/crypt32/cert.c
+1
-9
encode.c
dlls/crypt32/encode.c
+45
-53
msc.c
dlls/dbghelp/msc.c
+1
-8
main.c
dlls/ddraw/main.c
+1
-9
atom.c
dlls/kernel/atom.c
+1
-9
computername.c
dlls/kernel/computername.c
+4
-12
file.c
dlls/kernel/file.c
+1
-8
heap.c
dlls/kernel/heap.c
+4
-16
ne_module.c
dlls/kernel/ne_module.c
+1
-9
resource.c
dlls/kernel/resource.c
+3
-10
string.c
dlls/kernel/string.c
+8
-16
virtual.c
dlls/kernel/virtual.c
+4
-12
cpp.c
dlls/msvcrt/cpp.c
+3
-11
debugtools.c
dlls/ntdll/debugtools.c
+2
-10
loader.c
dlls/ntdll/loader.c
+1
-9
relay.c
dlls/ntdll/relay.c
+1
-9
resource.c
dlls/ntdll/resource.c
+3
-10
sec.c
dlls/ntdll/sec.c
+2
-10
rpc.c
dlls/ole32/rpc.c
+1
-8
cursoricon.c
dlls/user/cursoricon.c
+1
-12
lstr.c
dlls/user/lstr.c
+2
-9
driver.c
dlls/winmm/driver.c
+1
-1
lolvldrv.c
dlls/winmm/lolvldrv.c
+1
-1
No files found.
dlls/crypt32/cert.c
View file @
ae964ac8
...
...
@@ -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
;
...
...
dlls/crypt32/encode.c
View file @
ae964ac8
This diff is collapsed.
Click to expand it.
dlls/dbghelp/msc.c
View file @
ae964ac8
...
...
@@ -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
;
...
...
dlls/ddraw/main.c
View file @
ae964ac8
...
...
@@ -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
;
}
...
...
dlls/kernel/atom.c
View file @
ae964ac8
...
...
@@ -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
;
...
...
dlls/kernel/computername.c
View file @
ae964ac8
...
...
@@ -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
;
...
...
dlls/kernel/file.c
View file @
ae964ac8
...
...
@@ -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
);
...
...
dlls/kernel/heap.c
View file @
ae964ac8
...
...
@@ -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
);
...
...
dlls/kernel/ne_module.c
View file @
ae964ac8
...
...
@@ -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
;
...
...
dlls/kernel/resource.c
View file @
ae964ac8
...
...
@@ -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
);
}
...
...
dlls/kernel/string.c
View file @
ae964ac8
...
...
@@ -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
;
...
...
dlls/kernel/virtual.c
View file @
ae964ac8
...
...
@@ -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
;
...
...
dlls/msvcrt/cpp.c
View file @
ae964ac8
...
...
@@ -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!"
);
...
...
dlls/ntdll/debugtools.c
View file @
ae964ac8
...
...
@@ -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)"
;
...
...
dlls/ntdll/loader.c
View file @
ae964ac8
...
...
@@ -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
;
}
...
...
dlls/ntdll/relay.c
View file @
ae964ac8
...
...
@@ -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
...
...
dlls/ntdll/resource.c
View file @
ae964ac8
...
...
@@ -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
();
}
...
...
dlls/ntdll/sec.c
View file @
ae964ac8
...
...
@@ -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
;
...
...
dlls/ole32/rpc.c
View file @
ae964ac8
...
...
@@ -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
();
}
...
...
dlls/user/cursoricon.c
View file @
ae964ac8
...
...
@@ -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
;
}
...
...
dlls/user/lstr.c
View file @
ae964ac8
...
...
@@ -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
;
...
...
dlls/winmm/driver.c
View file @
ae964ac8
...
...
@@ -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
;
}
...
...
dlls/winmm/lolvldrv.c
View file @
ae964ac8
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment