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
d6e76274
Commit
d6e76274
authored
Jul 03, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Add support for exception handling in the generated proxy code.
parent
900bc569
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
0 deletions
+59
-0
proxy.c
tools/widl/proxy.c
+59
-0
No files found.
tools/widl/proxy.c
View file @
d6e76274
...
...
@@ -109,6 +109,65 @@ static void init_proxy(const statement_list_t *stmts)
print_proxy
(
"
\n
"
);
print_proxy
(
"#include
\"
%s
\"\n
"
,
header_name
);
print_proxy
(
"
\n
"
);
print_proxy
(
"#ifndef USE_COMPILER_EXCEPTIONS
\n
"
);
print_proxy
(
"
\n
"
);
print_proxy
(
"#include
\"
wine/exception.h
\"\n
"
);
print_proxy
(
"#undef RpcTryExcept
\n
"
);
print_proxy
(
"#undef RpcExcept
\n
"
);
print_proxy
(
"#undef RpcEndExcept
\n
"
);
print_proxy
(
"#undef RpcExceptionCode
\n
"
);
print_proxy
(
"
\n
"
);
print_proxy
(
"struct __proxy_frame
\n
"
);
print_proxy
(
"{
\n
"
);
print_proxy
(
" EXCEPTION_REGISTRATION_RECORD frame;
\n
"
);
print_proxy
(
" sigjmp_buf jmp;
\n
"
);
print_proxy
(
" DWORD code;
\n
"
);
print_proxy
(
" MIDL_STUB_MESSAGE *stub;
\n
"
);
print_proxy
(
"};
\n
"
);
print_proxy
(
"
\n
"
);
print_proxy
(
"static DWORD __proxy_exception_handler( EXCEPTION_RECORD *record,
\n
"
);
print_proxy
(
" EXCEPTION_REGISTRATION_RECORD *frame,
\n
"
);
print_proxy
(
" CONTEXT *context,
\n
"
);
print_proxy
(
" EXCEPTION_REGISTRATION_RECORD **pdispatcher )
\n
"
);
print_proxy
(
"{
\n
"
);
print_proxy
(
" struct __proxy_frame *proxy_frame = (struct __proxy_frame *)frame;
\n
"
);
print_proxy
(
"
\n
"
);
print_proxy
(
" if (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND | EH_NESTED_CALL))
\n
"
);
print_proxy
(
" return ExceptionContinueSearch;
\n
"
);
print_proxy
(
" if (proxy_frame->stub->dwStubPhase == PROXY_SENDRECEIVE)
\n
"
);
print_proxy
(
" return ExceptionContinueSearch;
\n
"
);
print_proxy
(
"
\n
"
);
print_proxy
(
" proxy_frame->code = record->ExceptionCode;
\n
"
);
print_proxy
(
" __wine_rtl_unwind( frame, record );
\n
"
);
print_proxy
(
" __wine_pop_frame( frame );
\n
"
);
print_proxy
(
" siglongjmp( proxy_frame->jmp, 1 );
\n
"
);
print_proxy
(
"}
\n
"
);
print_proxy
(
"
\n
"
);
print_proxy
(
"#define RpcTryExcept
\\\n
"
);
print_proxy
(
" do {
\\\n
"
);
print_proxy
(
" struct __proxy_frame __proxy_frame;
\\\n
"
);
print_proxy
(
" __proxy_frame.frame.Handler = __proxy_exception_handler;
\\\n
"
);
print_proxy
(
" __proxy_frame.stub = &_StubMsg;
\\\n
"
);
print_proxy
(
" if (!sigsetjmp( __proxy_frame.jmp, 0 ))
\\\n
"
);
print_proxy
(
" {
\\\n
"
);
print_proxy
(
" __wine_push_frame( &__proxy_frame.frame );
\\\n
"
);
print_proxy
(
" {
\n
"
);
print_proxy
(
"
\n
"
);
print_proxy
(
"#define RpcExcept(expr)
\\\n
"
);
print_proxy
(
" }
\\\n
"
);
print_proxy
(
" __wine_pop_frame( &__proxy_frame.frame );
\\\n
"
);
print_proxy
(
" }
\\\n
"
);
print_proxy
(
" else
\\\n
"
);
print_proxy
(
" {
\n
"
);
print_proxy
(
"
\n
"
);
print_proxy
(
"#define RpcEndExcept
\\\n
"
);
print_proxy
(
" }
\\\n
"
);
print_proxy
(
" } while(0);
\n
"
);
print_proxy
(
"
\n
"
);
print_proxy
(
"#define RpcExceptionCode() (__proxy_frame.code)
\n
"
);
print_proxy
(
"
\n
"
);
print_proxy
(
"#endif /* USE_COMPILER_EXCEPTIONS */
\n
"
);
print_proxy
(
"
\n
"
);
write_formatstringsdecl
(
proxy
,
indent
,
stmts
,
need_proxy
);
write_stubdescproto
();
}
...
...
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