Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
03e05c1f
Commit
03e05c1f
authored
Oct 09, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement RtlSetUnhandledExceptionFilter().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
da60ea1c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
6 deletions
+16
-6
process.c
dlls/kernel32/process.c
+1
-0
exception.c
dlls/ntdll/exception.c
+11
-0
loader.c
dlls/ntdll/loader.c
+0
-3
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-0
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+0
-2
thread.c
dlls/ntdll/thread.c
+0
-1
winternl.h
include/winternl.h
+3
-0
No files found.
dlls/kernel32/process.c
View file @
03e05c1f
...
...
@@ -1364,6 +1364,7 @@ void CDECL __wine_kernel_init(void)
setbuf
(
stderr
,
NULL
);
kernel32_handle
=
GetModuleHandleW
(
kernel32W
);
IsWow64Process
(
GetCurrentProcess
(),
&
is_wow64
);
RtlSetUnhandledExceptionFilter
(
UnhandledExceptionFilter
);
LOCALE_Init
();
...
...
dlls/ntdll/exception.c
View file @
03e05c1f
...
...
@@ -59,6 +59,8 @@ static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
};
static
RTL_CRITICAL_SECTION
vectored_handlers_section
=
{
&
critsect_debug
,
-
1
,
0
,
0
,
0
,
0
};
static
PRTL_EXCEPTION_FILTER
unhandled_exception_filter
;
static
VECTORED_HANDLER
*
add_vectored_handler
(
struct
list
*
handler_list
,
ULONG
first
,
PVECTORED_EXCEPTION_HANDLER
func
)
...
...
@@ -307,6 +309,15 @@ ULONG WINAPI RtlRemoveVectoredExceptionHandler( PVOID handler )
/*******************************************************************
* RtlSetUnhandledExceptionFilter (NTDLL.@)
*/
void
WINAPI
RtlSetUnhandledExceptionFilter
(
PRTL_EXCEPTION_FILTER
filter
)
{
unhandled_exception_filter
=
filter
;
}
/*******************************************************************
* call_unhandled_exception_filter
*/
LONG
WINAPI
call_unhandled_exception_filter
(
PEXCEPTION_POINTERS
eptr
)
...
...
dlls/ntdll/loader.c
View file @
03e05c1f
...
...
@@ -3520,9 +3520,6 @@ void __wine_process_init(void)
MESSAGE
(
"wine: could not load kernel32.dll, status %x
\n
"
,
status
);
exit
(
1
);
}
RtlInitAnsiString
(
&
func_name
,
"UnhandledExceptionFilter"
);
LdrGetProcedureAddress
(
wm
->
ldr
.
BaseAddress
,
&
func_name
,
0
,
(
void
**
)
&
unhandled_exception_filter
);
RtlInitAnsiString
(
&
func_name
,
"__wine_kernel_init"
);
if
((
status
=
LdrGetProcedureAddress
(
wm
->
ldr
.
BaseAddress
,
&
func_name
,
0
,
(
void
**
)
&
init_func
))
!=
STATUS_SUCCESS
)
...
...
dlls/ntdll/ntdll.spec
View file @
03e05c1f
...
...
@@ -904,6 +904,7 @@
# @ stub RtlSetThreadPoolStartFunc
@ stdcall RtlSetTimeZoneInformation(ptr)
# @ stub RtlSetTimer
@ stdcall RtlSetUnhandledExceptionFilter(ptr)
@ stub RtlSetUnicodeCallouts
@ stub RtlSetUserFlagsHeap
@ stub RtlSetUserValueHeap
...
...
dlls/ntdll/ntdll_misc.h
View file @
03e05c1f
...
...
@@ -116,8 +116,6 @@ extern void RELAY_SetupDLL( HMODULE hmod ) DECLSPEC_HIDDEN;
extern
void
SNOOP_SetupDLL
(
HMODULE
hmod
)
DECLSPEC_HIDDEN
;
extern
const
WCHAR
system_dir
[]
DECLSPEC_HIDDEN
;
typedef
LONG
(
WINAPI
*
PUNHANDLED_EXCEPTION_FILTER
)(
PEXCEPTION_POINTERS
);
extern
PUNHANDLED_EXCEPTION_FILTER
unhandled_exception_filter
DECLSPEC_HIDDEN
;
extern
void
(
WINAPI
*
kernel32_start_process
)(
LPTHREAD_START_ROUTINE
,
void
*
)
DECLSPEC_HIDDEN
;
/* redefine these to make sure we don't reference kernel symbols */
...
...
dlls/ntdll/thread.c
View file @
03e05c1f
...
...
@@ -55,7 +55,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(thread);
struct
_KUSER_SHARED_DATA
*
user_shared_data
=
NULL
;
static
const
WCHAR
default_windirW
[]
=
{
'C'
,
':'
,
'\\'
,
'w'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
0
};
PUNHANDLED_EXCEPTION_FILTER
unhandled_exception_filter
=
NULL
;
void
(
WINAPI
*
kernel32_start_process
)(
LPTHREAD_START_ROUTINE
,
void
*
)
=
NULL
;
/* info passed to a starting thread */
...
...
include/winternl.h
View file @
03e05c1f
...
...
@@ -2279,6 +2279,8 @@ typedef struct _SYSTEM_MODULE_INFORMATION
#define THREAD_CREATE_FLAGS_ACCESS_CHECK_IN_TARGET 0x00000020
#define THREAD_CREATE_FLAGS_INITIAL_THREAD 0x00000080
typedef
LONG
(
CALLBACK
*
PRTL_EXCEPTION_FILTER
)(
PEXCEPTION_POINTERS
);
/***********************************************************************
* Function declarations
*/
...
...
@@ -2813,6 +2815,7 @@ NTSYSAPI void WINAPI RtlSetLastWin32ErrorAndNtStatusFromNtStatus(NTSTATUS);
NTSYSAPI
NTSTATUS
WINAPI
RtlSetSaclSecurityDescriptor
(
PSECURITY_DESCRIPTOR
,
BOOLEAN
,
PACL
,
BOOLEAN
);
NTSYSAPI
NTSTATUS
WINAPI
RtlSetThreadErrorMode
(
DWORD
,
LPDWORD
);
NTSYSAPI
NTSTATUS
WINAPI
RtlSetTimeZoneInformation
(
const
RTL_TIME_ZONE_INFORMATION
*
);
NTSYSAPI
void
WINAPI
RtlSetUnhandledExceptionFilter
(
PRTL_EXCEPTION_FILTER
);
NTSYSAPI
SIZE_T
WINAPI
RtlSizeHeap
(
HANDLE
,
ULONG
,
const
void
*
);
NTSYSAPI
NTSTATUS
WINAPI
RtlSleepConditionVariableCS
(
RTL_CONDITION_VARIABLE
*
,
RTL_CRITICAL_SECTION
*
,
const
LARGE_INTEGER
*
);
NTSYSAPI
NTSTATUS
WINAPI
RtlSleepConditionVariableSRW
(
RTL_CONDITION_VARIABLE
*
,
RTL_SRWLOCK
*
,
const
LARGE_INTEGER
*
,
ULONG
);
...
...
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