mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-02 15:28:03 +00:00
oleaut32: Add an exception handler around code executed on the server side from the typelib marshaler.
This commit is contained in:
parent
aea12b4695
commit
a05672e55f
1 changed files with 26 additions and 6 deletions
|
@ -40,12 +40,14 @@
|
||||||
#include "winnls.h"
|
#include "winnls.h"
|
||||||
#include "winreg.h"
|
#include "winreg.h"
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
|
#include "excpt.h"
|
||||||
|
|
||||||
#include "ole2.h"
|
#include "ole2.h"
|
||||||
#include "propidl.h" /* for LPSAFEARRAY_User* functions */
|
#include "propidl.h" /* for LPSAFEARRAY_User* functions */
|
||||||
#include "typelib.h"
|
#include "typelib.h"
|
||||||
#include "variant.h"
|
#include "variant.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
#include "wine/exception.h"
|
||||||
|
|
||||||
static const WCHAR IDispatchW[] = { 'I','D','i','s','p','a','t','c','h',0};
|
static const WCHAR IDispatchW[] = { 'I','D','i','s','p','a','t','c','h',0};
|
||||||
|
|
||||||
|
@ -1785,12 +1787,30 @@ TMStubImpl_Invoke(
|
||||||
}
|
}
|
||||||
|
|
||||||
args[0] = (DWORD)This->pUnk;
|
args[0] = (DWORD)This->pUnk;
|
||||||
res = _invoke(
|
|
||||||
(*((FARPROC**)args[0]))[fdesc->oVft/4],
|
__TRY
|
||||||
fdesc->callconv,
|
{
|
||||||
(xargs-args),
|
res = _invoke(
|
||||||
args
|
(*((FARPROC**)args[0]))[fdesc->oVft/4],
|
||||||
);
|
fdesc->callconv,
|
||||||
|
(xargs-args),
|
||||||
|
args
|
||||||
|
);
|
||||||
|
}
|
||||||
|
__EXCEPT(NULL)
|
||||||
|
{
|
||||||
|
DWORD dwExceptionCode = GetExceptionCode();
|
||||||
|
ERR("invoke call failed with exception 0x%08lx (%ld)\n", dwExceptionCode, dwExceptionCode);
|
||||||
|
if (FAILED(dwExceptionCode))
|
||||||
|
hres = dwExceptionCode;
|
||||||
|
else
|
||||||
|
hres = HRESULT_FROM_WIN32(dwExceptionCode);
|
||||||
|
}
|
||||||
|
__ENDTRY
|
||||||
|
|
||||||
|
if (hres != S_OK)
|
||||||
|
return hres;
|
||||||
|
|
||||||
buf.curoff = 0;
|
buf.curoff = 0;
|
||||||
|
|
||||||
xargs = args+1;
|
xargs = args+1;
|
||||||
|
|
Loading…
Reference in a new issue