Synchronize with trunk r58606.
[reactos.git] / dll / win32 / rpcrt4 / cproxy.c
1 /*
2 * COM proxy implementation
3 *
4 * Copyright 2001 Ove Kåven, TransGaming Technologies
5 * Copyright 2009 Alexandre Julliard
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 *
21 * TODO: Handle non-i386 architectures
22 */
23
24 #define WIN32_NO_STATUS
25 #define _INC_WINDOWS
26
27 #include <config.h>
28 //#include "wine/port.h"
29
30 #include <stdarg.h>
31
32 #define COBJMACROS
33
34 #include <windef.h>
35 #include <winbase.h>
36 //#include "winerror.h"
37
38 #include <objbase.h>
39 #include <rpcproxy.h>
40
41 #include "cpsf.h"
42 //#include "ndr_misc.h"
43 //#include "ndr_stubless.h"
44 #include <wine/debug.h>
45
46 WINE_DEFAULT_DEBUG_CHANNEL(ole);
47
48 /* I don't know what MS's std proxy structure looks like,
49 so this probably doesn't match, but that shouldn't matter */
50 typedef struct {
51 IRpcProxyBuffer IRpcProxyBuffer_iface;
52 LPVOID *PVtbl;
53 LONG RefCount;
54 const IID* piid;
55 LPUNKNOWN pUnkOuter;
56 IUnknown *base_object; /* must be at offset 0x10 from PVtbl */
57 IRpcProxyBuffer *base_proxy;
58 PCInterfaceName name;
59 LPPSFACTORYBUFFER pPSFactory;
60 LPRPCCHANNELBUFFER pChannel;
61 } StdProxyImpl;
62
63 static const IRpcProxyBufferVtbl StdProxy_Vtbl;
64
65 static inline StdProxyImpl *impl_from_IRpcProxyBuffer(IRpcProxyBuffer *iface)
66 {
67 return CONTAINING_RECORD(iface, StdProxyImpl, IRpcProxyBuffer_iface);
68 }
69
70 static inline StdProxyImpl *impl_from_proxy_obj( void *iface )
71 {
72 return CONTAINING_RECORD(iface, StdProxyImpl, PVtbl);
73 }
74
75 #ifdef __i386__
76
77 extern void call_stubless_func(void);
78 __ASM_GLOBAL_FUNC(call_stubless_func,
79 "movl 4(%esp),%ecx\n\t" /* This pointer */
80 "movl (%ecx),%ecx\n\t" /* This->lpVtbl */
81 "movl -8(%ecx),%ecx\n\t" /* MIDL_STUBLESS_PROXY_INFO */
82 "movl 8(%ecx),%edx\n\t" /* info->FormatStringOffset */
83 "movzwl (%edx,%eax,2),%edx\n\t" /* FormatStringOffset[index] */
84 "addl 4(%ecx),%edx\n\t" /* info->ProcFormatString + offset */
85 "movzwl 8(%edx),%eax\n\t" /* arguments size */
86 "pushl %eax\n\t"
87 __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
88 "leal 8(%esp),%eax\n\t" /* &This */
89 "pushl %eax\n\t"
90 __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
91 "pushl %edx\n\t" /* format string */
92 __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
93 "pushl (%ecx)\n\t" /* info->pStubDesc */
94 __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
95 "call " __ASM_NAME("ndr_client_call") "\n\t"
96 "leal 12(%esp),%esp\n\t"
97 __ASM_CFI(".cfi_adjust_cfa_offset -12\n\t")
98 "popl %edx\n\t" /* arguments size */
99 __ASM_CFI(".cfi_adjust_cfa_offset -4\n\t")
100 "movl (%esp),%ecx\n\t" /* return address */
101 "addl %edx,%esp\n\t"
102 "jmp *%ecx" );
103
104 #include "pshpack1.h"
105 struct thunk
106 {
107 BYTE mov_eax;
108 DWORD index;
109 BYTE jmp;
110 LONG handler;
111 };
112 #include "poppack.h"
113
114 static inline void init_thunk( struct thunk *thunk, unsigned int index )
115 {
116 thunk->mov_eax = 0xb8; /* movl $n,%eax */
117 thunk->index = index;
118 thunk->jmp = 0xe9; /* jmp */
119 thunk->handler = (char *)call_stubless_func - (char *)(&thunk->handler + 1);
120 }
121
122 #elif defined(__x86_64__)
123
124 extern void call_stubless_func(void);
125 __ASM_GLOBAL_FUNC(call_stubless_func,
126 "movq %rcx,0x8(%rsp)\n\t"
127 "movq %rdx,0x10(%rsp)\n\t"
128 "movq %r8,0x18(%rsp)\n\t"
129 "movq %r9,0x20(%rsp)\n\t"
130 "leaq 0x8(%rsp),%r8\n\t" /* &This */
131 "movq (%rcx),%rcx\n\t" /* This->lpVtbl */
132 "movq -0x10(%rcx),%rcx\n\t" /* MIDL_STUBLESS_PROXY_INFO */
133 "movq 0x10(%rcx),%rdx\n\t" /* info->FormatStringOffset */
134 "movzwq (%rdx,%r10,2),%rdx\n\t" /* FormatStringOffset[index] */
135 "addq 8(%rcx),%rdx\n\t" /* info->ProcFormatString + offset */
136 "movq (%rcx),%rcx\n\t" /* info->pStubDesc */
137 "subq $0x38,%rsp\n\t"
138 __ASM_CFI(".cfi_adjust_cfa_offset 0x38\n\t")
139 "movq %xmm1,0x20(%rsp)\n\t"
140 "movq %xmm2,0x28(%rsp)\n\t"
141 "movq %xmm3,0x30(%rsp)\n\t"
142 "leaq 0x18(%rsp),%r9\n\t" /* fpu_args */
143 "call " __ASM_NAME("ndr_client_call") "\n\t"
144 "addq $0x38,%rsp\n\t"
145 __ASM_CFI(".cfi_adjust_cfa_offset -0x38\n\t")
146 "ret" );
147
148 #include "pshpack1.h"
149 struct thunk
150 {
151 BYTE mov_r10[3];
152 DWORD index;
153 BYTE mov_rax[2];
154 void *call_stubless;
155 BYTE jmp_rax[2];
156 };
157 #include "poppack.h"
158
159 static const struct thunk thunk_template =
160 {
161 { 0x49, 0xc7, 0xc2 }, 0, /* movq $index,%r10 */
162 { 0x48, 0xb8 }, 0, /* movq $call_stubless_func,%rax */
163 { 0xff, 0xe0 } /* jmp *%rax */
164 };
165
166 static inline void init_thunk( struct thunk *thunk, unsigned int index )
167 {
168 *thunk = thunk_template;
169 thunk->index = index;
170 thunk->call_stubless = call_stubless_func;
171 }
172
173 #else /* __i386__ */
174
175 #warning You must implement stubless proxies for your CPU
176
177 struct thunk
178 {
179 DWORD index;
180 };
181
182 static inline void init_thunk( struct thunk *thunk, unsigned int index )
183 {
184 thunk->index = index;
185 }
186
187 #endif /* __i386__ */
188
189 #define BLOCK_SIZE 1024
190 #define MAX_BLOCKS 64 /* 64k methods should be enough for anybody */
191
192 static const struct thunk *method_blocks[MAX_BLOCKS];
193
194 static const struct thunk *allocate_block( unsigned int num )
195 {
196 unsigned int i;
197 struct thunk *prev, *block;
198
199 block = VirtualAlloc( NULL, BLOCK_SIZE * sizeof(*block),
200 MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE );
201 if (!block) return NULL;
202
203 for (i = 0; i < BLOCK_SIZE; i++) init_thunk( &block[i], BLOCK_SIZE * num + i + 3 );
204 VirtualProtect( block, BLOCK_SIZE * sizeof(*block), PAGE_EXECUTE_READ, NULL );
205 prev = InterlockedCompareExchangePointer( (void **)&method_blocks[num], block, NULL );
206 if (prev) /* someone beat us to it */
207 {
208 VirtualFree( block, 0, MEM_RELEASE );
209 block = prev;
210 }
211 return block;
212 }
213
214 static BOOL fill_stubless_table( IUnknownVtbl *vtbl, DWORD num )
215 {
216 const void **entry = (const void **)(vtbl + 1);
217 DWORD i, j;
218
219 if (num - 3 > BLOCK_SIZE * MAX_BLOCKS)
220 {
221 FIXME( "%u methods not supported\n", num );
222 return FALSE;
223 }
224 for (i = 0; i < (num - 3 + BLOCK_SIZE - 1) / BLOCK_SIZE; i++)
225 {
226 const struct thunk *block = method_blocks[i];
227 if (!block && !(block = allocate_block( i ))) return FALSE;
228 for (j = 0; j < BLOCK_SIZE && j < num - 3 - i * BLOCK_SIZE; j++, entry++)
229 if (*entry == (LPVOID)-1) *entry = &block[j];
230 }
231 return TRUE;
232 }
233
234 HRESULT StdProxy_Construct(REFIID riid,
235 LPUNKNOWN pUnkOuter,
236 const ProxyFileInfo *ProxyInfo,
237 int Index,
238 LPPSFACTORYBUFFER pPSFactory,
239 LPRPCPROXYBUFFER *ppProxy,
240 LPVOID *ppvObj)
241 {
242 StdProxyImpl *This;
243 PCInterfaceName name = ProxyInfo->pNamesArray[Index];
244 CInterfaceProxyVtbl *vtbl = ProxyInfo->pProxyVtblList[Index];
245
246 TRACE("(%p,%p,%p,%p,%p) %s\n", pUnkOuter, vtbl, pPSFactory, ppProxy, ppvObj, name);
247
248 /* TableVersion = 2 means it is the stubless version of CInterfaceProxyVtbl */
249 if (ProxyInfo->TableVersion > 1) {
250 ULONG count = ProxyInfo->pStubVtblList[Index]->header.DispatchTableCount;
251 vtbl = (CInterfaceProxyVtbl *)((const void **)vtbl + 1);
252 TRACE("stubless vtbl %p: count=%d\n", vtbl->Vtbl, count );
253 fill_stubless_table( (IUnknownVtbl *)vtbl->Vtbl, count );
254 }
255
256 if (!IsEqualGUID(vtbl->header.piid, riid)) {
257 ERR("IID mismatch during proxy creation\n");
258 return RPC_E_UNEXPECTED;
259 }
260
261 This = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(StdProxyImpl));
262 if (!This) return E_OUTOFMEMORY;
263
264 if (!pUnkOuter) pUnkOuter = (IUnknown *)This;
265 This->IRpcProxyBuffer_iface.lpVtbl = &StdProxy_Vtbl;
266 This->PVtbl = vtbl->Vtbl;
267 /* one reference for the proxy */
268 This->RefCount = 1;
269 This->piid = vtbl->header.piid;
270 This->base_object = NULL;
271 This->base_proxy = NULL;
272 This->pUnkOuter = pUnkOuter;
273 This->name = name;
274 This->pPSFactory = pPSFactory;
275 This->pChannel = NULL;
276
277 if(ProxyInfo->pDelegatedIIDs && ProxyInfo->pDelegatedIIDs[Index])
278 {
279 HRESULT r = create_proxy( ProxyInfo->pDelegatedIIDs[Index], NULL,
280 &This->base_proxy, (void **)&This->base_object );
281 if (FAILED(r))
282 {
283 HeapFree( GetProcessHeap(), 0, This );
284 return r;
285 }
286 }
287
288 *ppProxy = &This->IRpcProxyBuffer_iface;
289 *ppvObj = &This->PVtbl;
290 IUnknown_AddRef((IUnknown *)*ppvObj);
291 IPSFactoryBuffer_AddRef(pPSFactory);
292
293 TRACE( "iid=%s this %p proxy %p obj %p vtbl %p base proxy %p base obj %p\n",
294 debugstr_guid(riid), This, *ppProxy, *ppvObj, This->PVtbl, This->base_proxy, This->base_object );
295 return S_OK;
296 }
297
298 static HRESULT WINAPI StdProxy_QueryInterface(LPRPCPROXYBUFFER iface,
299 REFIID riid,
300 LPVOID *obj)
301 {
302 StdProxyImpl *This = impl_from_IRpcProxyBuffer(iface);
303 TRACE("(%p)->QueryInterface(%s,%p)\n",This,debugstr_guid(riid),obj);
304
305 if (IsEqualGUID(&IID_IUnknown,riid) ||
306 IsEqualGUID(This->piid,riid)) {
307 *obj = &This->PVtbl;
308 InterlockedIncrement(&This->RefCount);
309 return S_OK;
310 }
311
312 if (IsEqualGUID(&IID_IRpcProxyBuffer,riid)) {
313 *obj = &This->IRpcProxyBuffer_iface;
314 InterlockedIncrement(&This->RefCount);
315 return S_OK;
316 }
317
318 return E_NOINTERFACE;
319 }
320
321 static ULONG WINAPI StdProxy_AddRef(LPRPCPROXYBUFFER iface)
322 {
323 StdProxyImpl *This = impl_from_IRpcProxyBuffer(iface);
324 TRACE("(%p)->AddRef()\n",This);
325
326 return InterlockedIncrement(&This->RefCount);
327 }
328
329 static ULONG WINAPI StdProxy_Release(LPRPCPROXYBUFFER iface)
330 {
331 ULONG refs;
332 StdProxyImpl *This = impl_from_IRpcProxyBuffer(iface);
333 TRACE("(%p)->Release()\n",This);
334
335 refs = InterlockedDecrement(&This->RefCount);
336 if (!refs)
337 {
338 if (This->pChannel)
339 IRpcProxyBuffer_Disconnect(&This->IRpcProxyBuffer_iface);
340
341 if (This->base_object) IUnknown_Release( This->base_object );
342 if (This->base_proxy) IRpcProxyBuffer_Release( This->base_proxy );
343
344 IPSFactoryBuffer_Release(This->pPSFactory);
345 HeapFree(GetProcessHeap(),0,This);
346 }
347
348 return refs;
349 }
350
351 static HRESULT WINAPI StdProxy_Connect(LPRPCPROXYBUFFER iface,
352 LPRPCCHANNELBUFFER pChannel)
353 {
354 StdProxyImpl *This = impl_from_IRpcProxyBuffer(iface);
355 TRACE("(%p)->Connect(%p)\n",This,pChannel);
356
357 This->pChannel = pChannel;
358 IRpcChannelBuffer_AddRef(pChannel);
359 if (This->base_proxy) IRpcProxyBuffer_Connect( This->base_proxy, pChannel );
360 return S_OK;
361 }
362
363 static VOID WINAPI StdProxy_Disconnect(LPRPCPROXYBUFFER iface)
364 {
365 StdProxyImpl *This = impl_from_IRpcProxyBuffer(iface);
366 TRACE("(%p)->Disconnect()\n",This);
367
368 if (This->base_proxy) IRpcProxyBuffer_Disconnect( This->base_proxy );
369
370 IRpcChannelBuffer_Release(This->pChannel);
371 This->pChannel = NULL;
372 }
373
374 static const IRpcProxyBufferVtbl StdProxy_Vtbl =
375 {
376 StdProxy_QueryInterface,
377 StdProxy_AddRef,
378 StdProxy_Release,
379 StdProxy_Connect,
380 StdProxy_Disconnect
381 };
382
383 static void StdProxy_GetChannel(LPVOID iface,
384 LPRPCCHANNELBUFFER *ppChannel)
385 {
386 StdProxyImpl *This = impl_from_proxy_obj( iface );
387 TRACE("(%p)->GetChannel(%p) %s\n",This,ppChannel,This->name);
388
389 *ppChannel = This->pChannel;
390 }
391
392 static void StdProxy_GetIID(LPVOID iface,
393 const IID **ppiid)
394 {
395 StdProxyImpl *This = impl_from_proxy_obj( iface );
396 TRACE("(%p)->GetIID(%p) %s\n",This,ppiid,This->name);
397
398 *ppiid = This->piid;
399 }
400
401 HRESULT WINAPI IUnknown_QueryInterface_Proxy(LPUNKNOWN iface,
402 REFIID riid,
403 LPVOID *ppvObj)
404 {
405 StdProxyImpl *This = impl_from_proxy_obj( iface );
406 TRACE("(%p)->QueryInterface(%s,%p) %s\n",This,debugstr_guid(riid),ppvObj,This->name);
407 return IUnknown_QueryInterface(This->pUnkOuter,riid,ppvObj);
408 }
409
410 ULONG WINAPI IUnknown_AddRef_Proxy(LPUNKNOWN iface)
411 {
412 StdProxyImpl *This = impl_from_proxy_obj( iface );
413 TRACE("(%p)->AddRef() %s\n",This,This->name);
414 return IUnknown_AddRef(This->pUnkOuter);
415 }
416
417 ULONG WINAPI IUnknown_Release_Proxy(LPUNKNOWN iface)
418 {
419 StdProxyImpl *This = impl_from_proxy_obj( iface );
420 TRACE("(%p)->Release() %s\n",This,This->name);
421 return IUnknown_Release(This->pUnkOuter);
422 }
423
424 /***********************************************************************
425 * NdrProxyInitialize [RPCRT4.@]
426 */
427 void WINAPI NdrProxyInitialize(void *This,
428 PRPC_MESSAGE pRpcMsg,
429 PMIDL_STUB_MESSAGE pStubMsg,
430 PMIDL_STUB_DESC pStubDescriptor,
431 unsigned int ProcNum)
432 {
433 TRACE("(%p,%p,%p,%p,%d)\n", This, pRpcMsg, pStubMsg, pStubDescriptor, ProcNum);
434 NdrClientInitializeNew(pRpcMsg, pStubMsg, pStubDescriptor, ProcNum);
435 StdProxy_GetChannel(This, &pStubMsg->pRpcChannelBuffer);
436 IRpcChannelBuffer_GetDestCtx(pStubMsg->pRpcChannelBuffer,
437 &pStubMsg->dwDestContext,
438 &pStubMsg->pvDestContext);
439 TRACE("channel=%p\n", pStubMsg->pRpcChannelBuffer);
440 }
441
442 /***********************************************************************
443 * NdrProxyGetBuffer [RPCRT4.@]
444 */
445 void WINAPI NdrProxyGetBuffer(void *This,
446 PMIDL_STUB_MESSAGE pStubMsg)
447 {
448 HRESULT hr;
449 const IID *riid = NULL;
450
451 TRACE("(%p,%p)\n", This, pStubMsg);
452 pStubMsg->RpcMsg->BufferLength = pStubMsg->BufferLength;
453 pStubMsg->dwStubPhase = PROXY_GETBUFFER;
454 StdProxy_GetIID(This, &riid);
455 hr = IRpcChannelBuffer_GetBuffer(pStubMsg->pRpcChannelBuffer,
456 (RPCOLEMESSAGE*)pStubMsg->RpcMsg,
457 riid);
458 if (FAILED(hr))
459 {
460 RpcRaiseException(hr);
461 return;
462 }
463 pStubMsg->fBufferValid = TRUE;
464 pStubMsg->BufferStart = pStubMsg->RpcMsg->Buffer;
465 pStubMsg->BufferEnd = pStubMsg->BufferStart + pStubMsg->BufferLength;
466 pStubMsg->Buffer = pStubMsg->BufferStart;
467 pStubMsg->dwStubPhase = PROXY_MARSHAL;
468 }
469
470 /***********************************************************************
471 * NdrProxySendReceive [RPCRT4.@]
472 */
473 void WINAPI NdrProxySendReceive(void *This,
474 PMIDL_STUB_MESSAGE pStubMsg)
475 {
476 ULONG Status = 0;
477 HRESULT hr;
478
479 TRACE("(%p,%p)\n", This, pStubMsg);
480
481 if (!pStubMsg->pRpcChannelBuffer)
482 {
483 WARN("Trying to use disconnected proxy %p\n", This);
484 RpcRaiseException(RPC_E_DISCONNECTED);
485 }
486
487 pStubMsg->dwStubPhase = PROXY_SENDRECEIVE;
488 /* avoid sending uninitialised parts of the buffer on the wire */
489 pStubMsg->RpcMsg->BufferLength = pStubMsg->Buffer - (unsigned char *)pStubMsg->RpcMsg->Buffer;
490 hr = IRpcChannelBuffer_SendReceive(pStubMsg->pRpcChannelBuffer,
491 (RPCOLEMESSAGE*)pStubMsg->RpcMsg,
492 &Status);
493 pStubMsg->dwStubPhase = PROXY_UNMARSHAL;
494 pStubMsg->BufferLength = pStubMsg->RpcMsg->BufferLength;
495 pStubMsg->BufferStart = pStubMsg->RpcMsg->Buffer;
496 pStubMsg->BufferEnd = pStubMsg->BufferStart + pStubMsg->BufferLength;
497 pStubMsg->Buffer = pStubMsg->BufferStart;
498
499 /* raise exception if call failed */
500 if (hr == RPC_S_CALL_FAILED) RpcRaiseException(*(DWORD*)pStubMsg->Buffer);
501 else if (FAILED(hr)) RpcRaiseException(hr);
502 }
503
504 /***********************************************************************
505 * NdrProxyFreeBuffer [RPCRT4.@]
506 */
507 void WINAPI NdrProxyFreeBuffer(void *This,
508 PMIDL_STUB_MESSAGE pStubMsg)
509 {
510 TRACE("(%p,%p)\n", This, pStubMsg);
511
512 if (pStubMsg->fBufferValid)
513 {
514 IRpcChannelBuffer_FreeBuffer(pStubMsg->pRpcChannelBuffer,
515 (RPCOLEMESSAGE*)pStubMsg->RpcMsg);
516 pStubMsg->fBufferValid = TRUE;
517 }
518 }
519
520 /***********************************************************************
521 * NdrProxyErrorHandler [RPCRT4.@]
522 */
523 HRESULT WINAPI NdrProxyErrorHandler(DWORD dwExceptionCode)
524 {
525 WARN("(0x%08x): a proxy call failed\n", dwExceptionCode);
526
527 if (FAILED(dwExceptionCode))
528 return dwExceptionCode;
529 else
530 return HRESULT_FROM_WIN32(dwExceptionCode);
531 }
532
533 HRESULT WINAPI
534 CreateProxyFromTypeInfo( LPTYPEINFO pTypeInfo, LPUNKNOWN pUnkOuter, REFIID riid,
535 LPRPCPROXYBUFFER *ppProxy, LPVOID *ppv )
536 {
537 typedef INT (WINAPI *MessageBoxA)(HWND,LPCSTR,LPCSTR,UINT);
538 HMODULE hUser32 = LoadLibraryA("user32");
539 MessageBoxA pMessageBoxA = (void *)GetProcAddress(hUser32, "MessageBoxA");
540
541 FIXME("%p %p %s %p %p\n", pTypeInfo, pUnkOuter, debugstr_guid(riid), ppProxy, ppv);
542 if (pMessageBoxA)
543 {
544 pMessageBoxA(NULL,
545 "The native implementation of OLEAUT32.DLL cannot be used "
546 "with Wine's RPCRT4.DLL. Remove OLEAUT32.DLL and try again.\n",
547 "Wine: Unimplemented CreateProxyFromTypeInfo",
548 0x10);
549 ExitProcess(1);
550 }
551 return E_NOTIMPL;
552 }
553
554 HRESULT WINAPI
555 CreateStubFromTypeInfo(ITypeInfo *pTypeInfo, REFIID riid, IUnknown *pUnkServer,
556 IRpcStubBuffer **ppStub )
557 {
558 typedef INT (WINAPI *MessageBoxA)(HWND,LPCSTR,LPCSTR,UINT);
559 HMODULE hUser32 = LoadLibraryA("user32");
560 MessageBoxA pMessageBoxA = (void *)GetProcAddress(hUser32, "MessageBoxA");
561
562 FIXME("%p %s %p %p\n", pTypeInfo, debugstr_guid(riid), pUnkServer, ppStub);
563 if (pMessageBoxA)
564 {
565 pMessageBoxA(NULL,
566 "The native implementation of OLEAUT32.DLL cannot be used "
567 "with Wine's RPCRT4.DLL. Remove OLEAUT32.DLL and try again.\n",
568 "Wine: Unimplemented CreateProxyFromTypeInfo",
569 0x10);
570 ExitProcess(1);
571 }
572 return E_NOTIMPL;
573 }