Commit 57493dc2 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

rpcrt4: Add a stub implementation of CreateStubFromTypeInfo().

parent 12021a56
......@@ -512,24 +512,3 @@ HRESULT WINAPI NdrProxyErrorHandler(DWORD dwExceptionCode)
else
return HRESULT_FROM_WIN32(dwExceptionCode);
}
HRESULT WINAPI
CreateStubFromTypeInfo(ITypeInfo *pTypeInfo, REFIID riid, IUnknown *pUnkServer,
IRpcStubBuffer **ppStub )
{
typedef INT (WINAPI *MessageBoxA)(HWND,LPCSTR,LPCSTR,UINT);
HMODULE hUser32 = LoadLibraryA("user32");
MessageBoxA pMessageBoxA = (void *)GetProcAddress(hUser32, "MessageBoxA");
FIXME("%p %s %p %p\n", pTypeInfo, debugstr_guid(riid), pUnkServer, ppStub);
if (pMessageBoxA)
{
pMessageBoxA(NULL,
"The native implementation of OLEAUT32.DLL cannot be used "
"with Wine's RPCRT4.DLL. Remove OLEAUT32.DLL and try again.\n",
"Wine: Unimplemented CreateProxyFromTypeInfo",
0x10);
ExitProcess(1);
}
return E_NOTIMPL;
}
......@@ -91,3 +91,39 @@ HRESULT WINAPI CreateProxyFromTypeInfo(ITypeInfo *typeinfo, IUnknown *outer,
return hr;
}
struct typelib_stub
{
CStdStubBuffer stub;
};
static HRESULT typelib_stub_init(struct typelib_stub *stub, IUnknown *server,
IRpcStubBuffer **stub_buffer)
{
stub->stub.RefCount = 1;
*stub_buffer = (IRpcStubBuffer *)&stub->stub;
return E_NOTIMPL;
}
HRESULT WINAPI CreateStubFromTypeInfo(ITypeInfo *typeinfo, REFIID iid,
IUnknown *server, IRpcStubBuffer **stub_buffer)
{
struct typelib_stub *stub;
HRESULT hr;
TRACE("typeinfo %p, iid %s, server %p, stub_buffer %p.\n",
typeinfo, debugstr_guid(iid), server, stub_buffer);
if (!(stub = heap_alloc_zero(sizeof(*stub))))
{
ERR("Failed to allocate stub object.\n");
return E_OUTOFMEMORY;
}
hr = typelib_stub_init(stub, server, stub_buffer);
if (FAILED(hr))
heap_free(stub);
return hr;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment