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
1c04d9ab
Commit
1c04d9ab
authored
Jun 10, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Jun 12, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Add an exception handler for CStdStubBuffer_Invoke.
This is needed because IRpcStubBuffer::Invoke should not allow RPC exceptions to be passed to the caller.
parent
35982d72
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
6 deletions
+30
-6
cstub.c
dlls/rpcrt4/cstub.c
+30
-6
No files found.
dlls/rpcrt4/cstub.c
View file @
1c04d9ab
...
...
@@ -25,12 +25,13 @@
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "excpt.h"
#include "objbase.h"
#include "rpcproxy.h"
#include "wine/debug.h"
#include "wine/exception.h"
#include "cpsf.h"
...
...
@@ -38,6 +39,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
#define STUB_HEADER(This) (((CInterfaceStubHeader*)((This)->lpVtbl))[-1])
static
WINE_EXCEPTION_FILTER
(
stub_filter
)
{
if
(
GetExceptionCode
()
==
EXCEPTION_ACCESS_VIOLATION
)
return
EXCEPTION_CONTINUE_SEARCH
;
return
EXCEPTION_EXECUTE_HANDLER
;
}
HRESULT
WINAPI
CStdStubBuffer_Construct
(
REFIID
riid
,
LPUNKNOWN
pUnkServer
,
PCInterfaceName
name
,
...
...
@@ -142,13 +150,29 @@ HRESULT WINAPI CStdStubBuffer_Invoke(LPRPCSTUBBUFFER iface,
{
CStdStubBuffer
*
This
=
(
CStdStubBuffer
*
)
iface
;
DWORD
dwPhase
=
STUB_UNMARSHAL
;
HRESULT
hr
=
S_OK
;
TRACE
(
"(%p)->Invoke(%p,%p)
\n
"
,
This
,
pMsg
,
pChannel
);
if
(
STUB_HEADER
(
This
).
pDispatchTable
)
STUB_HEADER
(
This
).
pDispatchTable
[
pMsg
->
iMethod
](
iface
,
pChannel
,
(
PRPC_MESSAGE
)
pMsg
,
&
dwPhase
);
else
/* pure interpreted */
NdrStubCall2
(
iface
,
pChannel
,
(
PRPC_MESSAGE
)
pMsg
,
&
dwPhase
);
return
S_OK
;
__TRY
{
if
(
STUB_HEADER
(
This
).
pDispatchTable
)
STUB_HEADER
(
This
).
pDispatchTable
[
pMsg
->
iMethod
](
iface
,
pChannel
,
(
PRPC_MESSAGE
)
pMsg
,
&
dwPhase
);
else
/* pure interpreted */
NdrStubCall2
(
iface
,
pChannel
,
(
PRPC_MESSAGE
)
pMsg
,
&
dwPhase
);
}
__EXCEPT
(
stub_filter
)
{
DWORD
dwExceptionCode
=
GetExceptionCode
();
WARN
(
"a stub call failed with exception 0x%08lx (%ld)
\n
"
,
dwExceptionCode
,
dwExceptionCode
);
if
(
FAILED
(
dwExceptionCode
))
hr
=
dwExceptionCode
;
else
hr
=
HRESULT_FROM_WIN32
(
dwExceptionCode
);
}
__ENDTRY
return
hr
;
}
LPRPCSTUBBUFFER
WINAPI
CStdStubBuffer_IsIIDSupported
(
LPRPCSTUBBUFFER
iface
,
...
...
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