ole32 [2/7]: Add WIDL-generated proxies for unknwn.idl and dcom.idl.
Dan Hipschman
dsh at linux.ucla.edu
Wed Nov 28 19:22:21 CST 2007
---
dlls/ole32/Makefile.in | 7 +++--
dlls/ole32/ole32_unknwn.idl | 25 ++++++++++++++++++++++++
dlls/ole32/oleproxy.c | 20 ++++++++++++++----
dlls/ole32/usrmarshal.c | 44 +++++++++++++++++++++++++++++++++++++++++++
4 files changed, 88 insertions(+), 8 deletions(-)
create mode 100644 dlls/ole32/ole32_unknwn.idl
diff --git a/dlls/ole32/Makefile.in b/dlls/ole32/Makefile.in
index d6e9eef..8f8a82b 100644
--- a/dlls/ole32/Makefile.in
+++ b/dlls/ole32/Makefile.in
@@ -64,12 +64,13 @@ RC_SRCS = ole32res.rc
RC_SRCS16 = version16.rc
-IDL_H_SRCS = \
- dcom.idl
-
IDL_C_SRCS = \
irot.idl
+IDL_P_SRCS = \
+ dcom.idl \
+ ole32_unknwn.idl
+
@MAKE_DLL_RULES@
ole2nls.spec.o: ole2nls.spec version16.res
diff --git a/dlls/ole32/ole32_unknwn.idl b/dlls/ole32/ole32_unknwn.idl
new file mode 100644
index 0000000..a63f156
--- /dev/null
+++ b/dlls/ole32/ole32_unknwn.idl
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2007 Google (Dan Hipschman)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/* The header file generated from this includes rpc.h, which ends up
+ including unknwn.h at some point. This will cause all sorts of errors
+ so the easiest thing to do is just comment out our entire header. */
+
+cpp_quote("#if 0 /* oleaut32_unknwn.idl hack */")
+#include "unknwn.idl"
+cpp_quote("#endif /* oleaut32_unknwn.idl hack */")
diff --git a/dlls/ole32/oleproxy.c b/dlls/ole32/oleproxy.c
index 9af6c59..6c0bcb4 100644
--- a/dlls/ole32/oleproxy.c
+++ b/dlls/ole32/oleproxy.c
@@ -52,6 +52,7 @@
#include "objbase.h"
#include "ole2.h"
#include "rpc.h"
+#include "rpcproxy.h"
#include "winerror.h"
#include "wtypes.h"
@@ -991,6 +992,9 @@ PSFacBuf_CreateStub(
return E_FAIL;
}
+static CStdPSFactoryBuffer PSFactoryBuffer;
+CSTDSTUBBUFFERRELEASE(&PSFactoryBuffer)
+
static const IPSFactoryBufferVtbl psfacbufvtbl = {
PSFacBuf_QueryInterface,
PSFacBuf_AddRef,
@@ -1002,14 +1006,21 @@ static const IPSFactoryBufferVtbl psfacbufvtbl = {
/* This is the whole PSFactoryBuffer object, just the vtableptr */
static const IPSFactoryBufferVtbl *lppsfac = &psfacbufvtbl;
+extern const ExtendedProxyFileInfo dcom_ProxyFileInfo;
+extern const ExtendedProxyFileInfo ole32_unknwn_ProxyFileInfo;
+
+static const ProxyFileInfo *OLE32_ProxyFileList[] = {
+ &dcom_ProxyFileInfo,
+ &ole32_unknwn_ProxyFileInfo,
+ NULL
+};
+
/***********************************************************************
* DllGetClassObject [OLE32.@]
*/
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv)
{
*ppv = NULL;
- if (IsEqualIID(rclsid, &CLSID_PSFactoryBuffer))
- return IPSFactoryBuffer_QueryInterface((IPSFactoryBuffer *)&lppsfac, iid, ppv);
if (IsEqualIID(rclsid,&CLSID_DfMarshal)&&(
IsEqualIID(iid,&IID_IClassFactory) ||
IsEqualIID(iid,&IID_IUnknown)
@@ -1028,7 +1039,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv)
return CompositeMonikerCF_Create(iid, ppv);
if (IsEqualCLSID(rclsid, &CLSID_ClassMoniker))
return ClassMonikerCF_Create(iid, ppv);
-
- FIXME("\n\tCLSID:\t%s,\n\tIID:\t%s\n",debugstr_guid(rclsid),debugstr_guid(iid));
- return CLASS_E_CLASSNOTAVAILABLE;
+ return NdrDllGetClassObject(rclsid, iid, ppv, OLE32_ProxyFileList,
+ &CLSID_PSFactoryBuffer, &PSFactoryBuffer);
}
diff --git a/dlls/ole32/usrmarshal.c b/dlls/ole32/usrmarshal.c
index c25b86a..552c96e 100644
--- a/dlls/ole32/usrmarshal.c
+++ b/dlls/ole32/usrmarshal.c
@@ -1957,3 +1957,47 @@ void __RPC_USER SNB_UserFree(ULONG *pFlags, SNB *pSnb)
{
FIXME(":stub\n");
}
+
+/* call_as/local stubs for unknwn.idl */
+
+HRESULT CALLBACK IClassFactory_CreateInstance_Proxy(
+ IClassFactory* This,
+ IUnknown *pUnkOuter,
+ REFIID riid,
+ void **ppvObject)
+{
+ TRACE("(%p, %s, %p)\n", pUnkOuter, debugstr_guid(riid), ppvObject);
+ *ppvObject = NULL;
+ if (pUnkOuter)
+ {
+ ERR("aggregation is not allowed on remote objects\n");
+ return CLASS_E_NOAGGREGATION;
+ }
+ return IClassFactory_RemoteCreateInstance_Proxy(This, riid,
+ (IUnknown **) ppvObject);
+}
+
+HRESULT __RPC_STUB IClassFactory_CreateInstance_Stub(
+ IClassFactory* This,
+ REFIID riid,
+ IUnknown **ppvObject)
+{
+ TRACE("(%s, %p)\n", debugstr_guid(riid), ppvObject);
+ return IClassFactory_CreateInstance(This, NULL, riid, (void **) ppvObject);
+}
+
+HRESULT CALLBACK IClassFactory_LockServer_Proxy(
+ IClassFactory* This,
+ BOOL fLock)
+{
+ FIXME(":stub\n");
+ return E_NOTIMPL;
+}
+
+HRESULT __RPC_STUB IClassFactory_LockServer_Stub(
+ IClassFactory* This,
+ BOOL fLock)
+{
+ FIXME(":stub\n");
+ return E_NOTIMPL;
+}
More information about the wine-patches
mailing list