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
43df8b61
Commit
43df8b61
authored
Sep 14, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Sep 14, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add exception handling for stubs.
parent
3d14d01c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
5 deletions
+27
-5
compobj.c
dlls/ole32/compobj.c
+2
-1
compobj_private.h
dlls/ole32/compobj_private.h
+1
-1
rpc.c
dlls/ole32/rpc.c
+24
-3
No files found.
dlls/ole32/compobj.c
View file @
43df8b61
...
...
@@ -419,7 +419,8 @@ static LRESULT CALLBACK apartment_wndproc(HWND hWnd, UINT msg, WPARAM wParam, LP
switch
(
msg
)
{
case
DM_EXECUTERPC
:
return
RPC_ExecuteCall
((
struct
dispatch_params
*
)
lParam
);
RPC_ExecuteCall
((
struct
dispatch_params
*
)
lParam
);
return
0
;
default:
return
DefWindowProcW
(
hWnd
,
msg
,
wParam
,
lParam
);
}
...
...
dlls/ole32/compobj_private.h
View file @
43df8b61
...
...
@@ -200,7 +200,7 @@ struct dispatch_params;
void
RPC_StartRemoting
(
struct
apartment
*
apt
);
HRESULT
RPC_CreateClientChannel
(
const
OXID
*
oxid
,
const
IPID
*
ipid
,
IRpcChannelBuffer
**
pipebuf
);
HRESULT
RPC_ExecuteCall
(
struct
dispatch_params
*
params
);
void
RPC_ExecuteCall
(
struct
dispatch_params
*
params
);
HRESULT
RPC_RegisterInterface
(
REFIID
riid
);
void
RPC_UnregisterInterface
(
REFIID
riid
);
void
RPC_StartLocalServer
(
REFCLSID
clsid
,
IStream
*
stream
);
...
...
dlls/ole32/rpc.c
View file @
43df8b61
...
...
@@ -42,7 +42,9 @@
#include "winerror.h"
#include "winreg.h"
#include "wtypes.h"
#include "excpt.h"
#include "wine/unicode.h"
#include "wine/exception.h"
#include "compobj_private.h"
...
...
@@ -105,8 +107,17 @@ struct dispatch_params
IRpcChannelBuffer
*
chan
;
/* server channel buffer, if applicable */
HANDLE
handle
;
/* handle that will become signaled when call finishes */
RPC_STATUS
status
;
/* status (out) */
HRESULT
hr
;
/* hresult (out) */
};
static
WINE_EXCEPTION_FILTER
(
ole_filter
)
{
if
(
GetExceptionCode
()
==
EXCEPTION_ACCESS_VIOLATION
||
GetExceptionCode
()
==
EXCEPTION_PRIV_INSTRUCTION
)
return
EXCEPTION_CONTINUE_SEARCH
;
return
EXCEPTION_EXECUTE_HANDLER
;
}
static
HRESULT
WINAPI
RpcChannelBuffer_QueryInterface
(
LPRPCCHANNELBUFFER
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
*
ppv
=
NULL
;
...
...
@@ -228,6 +239,7 @@ static HRESULT WINAPI RpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER iface, RPC
params
->
msg
=
olemsg
;
params
->
status
=
RPC_S_OK
;
params
->
hr
=
S_OK
;
/* Note: this is an optimization in the Microsoft OLE runtime that we need
* to copy, as shown by the test_no_couninitialize_client test. without
...
...
@@ -271,6 +283,8 @@ static HRESULT WINAPI RpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER iface, RPC
hr
=
CoWaitForMultipleHandles
(
0
,
INFINITE
,
1
,
&
params
->
handle
,
&
index
);
CloseHandle
(
params
->
handle
);
if
(
hr
==
S_OK
)
hr
=
params
->
hr
;
status
=
params
->
status
;
HeapFree
(
GetProcessHeap
(),
0
,
params
);
params
=
NULL
;
...
...
@@ -434,12 +448,19 @@ HRESULT RPC_CreateServerChannel(IRpcChannelBuffer **chan)
}
HRESULT
RPC_ExecuteCall
(
struct
dispatch_params
*
params
)
void
RPC_ExecuteCall
(
struct
dispatch_params
*
params
)
{
HRESULT
hr
=
IRpcStubBuffer_Invoke
(
params
->
stub
,
params
->
msg
,
params
->
chan
);
__TRY
{
params
->
hr
=
IRpcStubBuffer_Invoke
(
params
->
stub
,
params
->
msg
,
params
->
chan
);
}
__EXCEPT
(
ole_filter
)
{
params
->
hr
=
GetExceptionCode
();
}
__ENDTRY
IRpcStubBuffer_Release
(
params
->
stub
);
if
(
params
->
handle
)
SetEvent
(
params
->
handle
);
return
hr
;
}
static
void
__RPC_STUB
dispatch_rpc
(
RPC_MESSAGE
*
msg
)
...
...
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