Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
43df8b61
Commit
43df8b61
authored
19 years ago
by
Robert Shearman
Committed by
Alexandre Julliard
19 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add exception handling for stubs.
parent
3d14d01c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/ole32/compobj.c
+2
-1
2 additions, 1 deletion
dlls/ole32/compobj.c
dlls/ole32/compobj_private.h
+1
-1
1 addition, 1 deletion
dlls/ole32/compobj_private.h
dlls/ole32/rpc.c
+24
-3
24 additions, 3 deletions
dlls/ole32/rpc.c
with
27 additions
and
5 deletions
dlls/ole32/compobj.c
+
2
−
1
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
);
}
...
...
This diff is collapsed.
Click to expand it.
dlls/ole32/compobj_private.h
+
1
−
1
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
);
...
...
This diff is collapsed.
Click to expand it.
dlls/ole32/rpc.c
+
24
−
3
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment