[PATCH 2/4] oleaut32: Implement TMStubImpl_Invoke on x86_64.
Marcus Meissner <[email protected]> Sun, 5 Nov 2017 16:00:03 +0100
| Newsgroups | gmane.comp.emulators.wine.patches |
|---|---|
| Message-ID | <[email protected]> |
From: Sebastian Lackner <[email protected]> Signed-off-by: Sebastian Lackner <[email protected]> Signed-off-by: Marcus Meissner <[email protected]> --- dlls/oleaut32/tmarshal.c | 2 +- dlls/oleaut32/typelib.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c index 9fd0f0374b..95bf2a7489 100644 --- a/dlls/oleaut32/tmarshal.c +++ b/dlls/oleaut32/tmarshal.c @@ -2073,7 +2073,7 @@ static HRESULT WINAPI TMStubImpl_Invoke( LPRPCSTUBBUFFER iface, RPCOLEMESSAGE* xmsg,IRpcChannelBuffer*rpcchanbuf) { -#ifdef __i386__ +#if defined(__i386__) || defined(__x86_64__) int i; const FUNCDESC *fdesc; TMStubImpl *This = impl_from_IRpcStubBuffer(iface); diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 037c7034ed..a87f0af1f0 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -6422,6 +6422,34 @@ __ASM_GLOBAL_FUNC( call_method, /* same function but returning floating point */ static double (CDECL * const call_double_method)(void*,int,const DWORD_PTR*) = (void *)call_method; +DWORD _invoke(FARPROC func, CALLCONV callconv, int nrargs, DWORD_PTR *args) +{ + DWORD res; + + if (TRACE_ON(ole)) + { + int i; + TRACE("Calling %p(", func); + for (i=0; i<min(nrargs, 30); i++) TRACE("%016lx,", args[i]); + if (nrargs > 30) TRACE("..."); + TRACE(")\n"); + } + + switch (callconv) { + case CC_STDCALL: + case CC_CDECL: + res = call_method(func, nrargs, args); + break; + default: + FIXME("unsupported calling convention %d\n", callconv); + res = -1; + break; + } + + TRACE("returns %08x\n", res); + return res; +} + #elif defined(__arm__) extern LONGLONG CDECL call_method( void *func, int nb_stk_args, const DWORD *stk_args, const DWORD *reg_args ); -- 2.14.3