55extern void call_stubless_func(
void);
57 "movl 4(%esp),%ecx\n\t"
58 "movl (%ecx),%ecx\n\t"
59 "movl -8(%ecx),%ecx\n\t"
60 "movl 8(%ecx),%edx\n\t"
61 "movzwl (%edx,%eax,2),%edx\n\t"
62 "addl 4(%ecx),%edx\n\t"
63 "movzbl 1(%edx),%eax\n\t"
66 "movzwl 4(%edx,%eax),%eax\n\t"
69 "leal 8(%esp),%eax\n\t"
77 "leal 12(%esp),%esp\n\t"
78 __ASM_CFI(
".cfi_adjust_cfa_offset -12\n\t")
80 __ASM_CFI(
".cfi_adjust_cfa_offset -4\n\t")
81 "movl (%esp),%ecx\n\t"
97 thunk->mov_eax = 0xb8;
100 thunk->handler = (
char *)call_stubless_func - (
char *)(&
thunk->handler + 1);
103#elif defined(__x86_64__)
105extern void call_stubless_func(
void);
107 "subq $0x38,%rsp\n\t"
110 __ASM_CFI(
".cfi_adjust_cfa_offset 0x38\n\t")
111 "movq %rcx,0x40(%rsp)\n\t"
112 "movq %rdx,0x48(%rsp)\n\t"
113 "movq %r8,0x50(%rsp)\n\t"
114 "movq %r9,0x58(%rsp)\n\t"
115 "leaq 0x40(%rsp),%r8\n\t"
116 "movq (%rcx),%rcx\n\t"
117 "movq -0x10(%rcx),%rcx\n\t"
118 "movq 0x10(%rcx),%rdx\n\t"
119 "movzwq (%rdx,%r10,2),%rdx\n\t"
120 "addq 8(%rcx),%rdx\n\t"
121 "movq (%rcx),%rcx\n\t"
122 "movq %xmm1,0x20(%rsp)\n\t"
123 "movq %xmm2,0x28(%rsp)\n\t"
124 "movq %xmm3,0x30(%rsp)\n\t"
125 "leaq 0x18(%rsp),%r9\n\t"
127 "addq $0x38,%rsp\n\t"
128 __ASM_CFI(
".cfi_adjust_cfa_offset -0x38\n\t")
144 { 0x49, 0xc7, 0xc2 }, 0,
153 thunk->call_stubless = call_stubless_func;
156#elif defined(__arm__)
158extern void call_stubless_func(
void);
165 "ldr r0, [r0,#-8]\n\t"
166 "ldr r1, [r0,#8]\n\t"
167 "ldrh r1, [r1,ip]\n\t"
168 "ldr ip, [r0,#4]\n\t"
193 thunk->ldr_ip = 0xe59fc000;
194 thunk->ldr_pc = 0xe59ff000;
196 thunk->func = call_stubless_func;
199#elif defined(__aarch64__)
201extern void call_stubless_func(
void);
203 "stp x29, x30, [sp, #-0x90]!\n\t"
205 "stp d0, d1, [sp, #0x10]\n\t"
206 "stp d2, d3, [sp, #0x20]\n\t"
207 "stp d4, d5, [sp, #0x30]\n\t"
208 "stp d6, d7, [sp, #0x40]\n\t"
209 "stp x0, x1, [sp, #0x50]\n\t"
210 "stp x2, x3, [sp, #0x60]\n\t"
211 "stp x4, x5, [sp, #0x70]\n\t"
212 "stp x6, x7, [sp, #0x80]\n\t"
214 "ldr x0, [x0, #-16]\n\t"
215 "ldp x1, x4, [x0, #8]\n\t"
216 "ldrh w4, [x4, x16, lsl #1]\n\t"
219 "add x2, sp, #0x50\n\t"
220 "add x3, sp, #0x10\n\t"
222 "ldp x29, x30, [sp], #0x90\n\t"
236 thunk->ldr_index = 0x18000070;
237 thunk->ldr_func = 0x58000071;
238 thunk->br = 0xd61f0220;
240 thunk->func = call_stubless_func;
245#warning You must implement stubless proxies for your CPU
259#define BLOCK_SIZE 1024
287 const void **
entry = (
const void **)(vtbl + 1);
292 FIXME(
"%u methods not supported\n",
num );
309 LPPSFACTORYBUFFER pPSFactory,
317 TRACE(
"(%p,%p,%p,%p,%p) %s\n", pUnkOuter, vtbl, pPSFactory, ppProxy, ppvObj,
name);
328 ERR(
"IID mismatch during proxy creation\n");
343 This->pUnkOuter = pUnkOuter;
345 This->pPSFactory = pPSFactory;
351 &
This->base_proxy, (
void **)&
This->base_object );
359 *ppProxy = &
This->IRpcProxyBuffer_iface;
360 *ppvObj = &
This->PVtbl;
361 IUnknown_AddRef((
IUnknown *)*ppvObj);
362 IPSFactoryBuffer_AddRef(pPSFactory);
364 TRACE(
"iid=%s this %p proxy %p obj %p vtbl %p base proxy %p base obj %p\n",
382 *
obj = &
This->IRpcProxyBuffer_iface;
408 IRpcProxyBuffer_Disconnect(&
This->IRpcProxyBuffer_iface);
410 if (
This->base_object) IUnknown_Release(
This->base_object );
411 if (
This->base_proxy) IRpcProxyBuffer_Release(
This->base_proxy );
413 IPSFactoryBuffer_Release(
This->pPSFactory);
423 TRACE(
"(%p)->Connect(%p)\n",
This,pChannel);
425 This->pChannel = pChannel;
426 IRpcChannelBuffer_AddRef(pChannel);
427 if (
This->base_proxy) IRpcProxyBuffer_Connect(
This->base_proxy, pChannel );
436 if (
This->base_proxy) IRpcProxyBuffer_Disconnect(
This->base_proxy );
438 IRpcChannelBuffer_Release(
This->pChannel);
455 TRACE(
"(%p)->GetChannel(%p) %s\n",
This,ppChannel,
This->name);
457 *ppChannel =
This->pChannel;
475 return IUnknown_QueryInterface(
This->pUnkOuter,
riid,ppvObj);
482 return IUnknown_AddRef(
This->pUnkOuter);
489 return IUnknown_Release(
This->pUnkOuter);
499 unsigned int ProcNum)
501 TRACE(
"(%p,%p,%p,%p,%d)\n",
This, pRpcMsg, pStubMsg, pStubDescriptor, ProcNum);
526 (RPCOLEMESSAGE*)pStubMsg->
RpcMsg,
553 WARN(
"Trying to use disconnected proxy %p\n",
This);
561 (RPCOLEMESSAGE*)pStubMsg->
RpcMsg,
585 (RPCOLEMESSAGE*)pStubMsg->
RpcMsg);
595 WARN(
"(0x%08x): a proxy call failed\n", dwExceptionCode);
597 if (
FAILED(dwExceptionCode))
598 return dwExceptionCode;
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static const struct vtable_fixup_thunk thunk_template
void WINAPI NdrProxyGetBuffer(void *This, PMIDL_STUB_MESSAGE pStubMsg)
ULONG WINAPI IUnknown_AddRef_Proxy(LPUNKNOWN iface)
void WINAPI NdrProxyInitialize(void *This, PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDescriptor, unsigned int ProcNum)
static const struct thunk * allocate_block(unsigned int num)
ULONG WINAPI IUnknown_Release_Proxy(LPUNKNOWN iface)
static void StdProxy_GetIID(LPVOID iface, const IID **ppiid)
static ULONG WINAPI StdProxy_Release(LPRPCPROXYBUFFER iface)
void WINAPI NdrProxyFreeBuffer(void *This, PMIDL_STUB_MESSAGE pStubMsg)
static const struct thunk * method_blocks[MAX_BLOCKS]
void WINAPI NdrProxySendReceive(void *This, PMIDL_STUB_MESSAGE pStubMsg)
static void init_thunk(struct thunk *thunk, unsigned int index)
HRESULT WINAPI NdrProxyErrorHandler(DWORD dwExceptionCode)
HRESULT WINAPI StdProxy_QueryInterface(IRpcProxyBuffer *iface, REFIID riid, void **obj)
static StdProxyImpl * impl_from_proxy_obj(void *iface)
static StdProxyImpl * impl_from_IRpcProxyBuffer(IRpcProxyBuffer *iface)
void WINAPI StdProxy_Disconnect(IRpcProxyBuffer *iface)
HRESULT WINAPI StdProxy_Connect(IRpcProxyBuffer *iface, IRpcChannelBuffer *pChannel)
static void StdProxy_GetChannel(LPVOID iface, LPRPCCHANNELBUFFER *ppChannel)
HRESULT WINAPI IUnknown_QueryInterface_Proxy(LPUNKNOWN iface, REFIID riid, LPVOID *ppvObj)
BOOL fill_stubless_table(IUnknownVtbl *vtbl, DWORD num)
HRESULT StdProxy_Construct(REFIID riid, LPUNKNOWN pUnkOuter, const ProxyFileInfo *ProxyInfo, int Index, LPPSFACTORYBUFFER pPSFactory, LPRPCPROXYBUFFER *ppProxy, LPVOID *ppvObj)
ULONG WINAPI StdProxy_AddRef(IRpcProxyBuffer *iface)
static const IRpcProxyBufferVtbl StdProxy_Vtbl
HRESULT create_proxy(REFIID iid, IUnknown *pUnkOuter, IRpcProxyBuffer **pproxy, void **ppv) DECLSPEC_HIDDEN
#define HeapFree(x, y, z)
UINT(* handler)(MSIPACKAGE *)
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble r
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define InterlockedCompareExchangePointer
#define __ASM_GLOBAL_FUNC(name, code)
void WINAPI NdrClientInitializeNew(PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc, unsigned int ProcNum)
#define PAGE_EXECUTE_READ
#define PAGE_EXECUTE_READWRITE
interface IRpcProxyBuffer * LPRPCPROXYBUFFER
interface IRpcChannelBuffer * LPRPCCHANNELBUFFER
#define IsEqualGUID(rguid1, rguid2)
const char * PCInterfaceName
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
unsigned int fBufferValid
struct IRpcChannelBuffer * pRpcChannelBuffer
unsigned char * BufferEnd
unsigned char * BufferStart
unsigned int BufferLength
CInterfaceProxyHeader header
CInterfaceStubHeader header
unsigned short TableVersion
const IID ** pDelegatedIIDs
const PCInterfaceStubVtblList * pStubVtblList
const PCInterfaceProxyVtblList * pProxyVtblList
const PCInterfaceName * pNamesArray
#define CONTAINING_RECORD(address, type, field)
_In_ WDFCOLLECTION _In_ ULONG Index
LPVOID NTAPI VirtualAlloc(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flAllocationType, IN DWORD flProtect)
BOOL NTAPI VirtualProtect(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flNewProtect, OUT PDWORD lpflOldProtect)
BOOL NTAPI VirtualFree(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD dwFreeType)
#define RPC_S_CALL_FAILED
#define CO_E_OBJNOTCONNECTED
#define HRESULT_FROM_WIN32(x)
#define RPC_E_DISCONNECTED
static unsigned int block