Huw Davies : msdaps: Add stub class factories for the row and rowset servers and proxies.

Alexandre Julliard julliard at winehq.org
Fri Jan 22 08:26:51 CST 2010


Module: wine
Branch: master
Commit: de6f38108aed5e0625efa256852d8d4c26f5d66c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=de6f38108aed5e0625efa256852d8d4c26f5d66c

Author: Huw Davies <huw at codeweavers.com>
Date:   Thu Jan 21 11:53:25 2010 +0000

msdaps: Add stub class factories for the row and rowset servers and proxies.

---

 .gitignore                 |    2 +
 dlls/msdaps/Makefile.in    |    6 ++-
 dlls/msdaps/main.c         |  101 ++++++++++++++++++++++++++++++++++++++++++++
 dlls/msdaps/row_server.c   |   68 +++++++++++++++++++++++++++++
 dlls/msdaps/row_server.idl |   56 ++++++++++++++++++++++++
 5 files changed, 231 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index f2a0bd8..6c26883 100644
--- a/.gitignore
+++ b/.gitignore
@@ -65,6 +65,8 @@ dlls/libxinput.def
 dlls/msdaps/msdaps.h
 dlls/msdaps/msdaps_i.c
 dlls/msdaps/msdaps_p.c
+dlls/msdaps/row_server.h
+dlls/msdaps/row_server_i.c
 dlls/mshtml.tlb/mshtml_tlb.tlb
 dlls/mshtml/nsiface.h
 dlls/msi/cond.tab.c
diff --git a/dlls/msdaps/Makefile.in b/dlls/msdaps/Makefile.in
index c81c6ef..d602f13 100644
--- a/dlls/msdaps/Makefile.in
+++ b/dlls/msdaps/Makefile.in
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = msdaps.dll
-IMPORTS   = oleaut32 ole32 rpcrt4 kernel32 ntdll
+IMPORTS   = uuid oleaut32 ole32 rpcrt4 kernel32 ntdll
 EXTRADEFS = -DREGISTER_PROXY_DLL -DPROXY_CLSID_IS="{ 0x06210e88, 0x01f5, 0x11d1, { 0xb5, 0x12, 0x00, 0x80, 0xc7, 0x81, 0xc3, 0x84 } }" -DENTRY_PREFIX=msdaps_
 EXTRAIDLFLAGS = --win32-align=2
 
@@ -12,10 +12,12 @@ EXTRA_OBJS = dlldata.o
 C_SRCS = \
 	main.c \
 	regsvr.c \
+	row_server.c \
 	usrmarshal.c
 
 IDL_I_SRCS = \
-	msdaps.idl
+	msdaps.idl \
+	row_server.idl
 
 IDL_P_SRCS = \
 	msdaps.idl
diff --git a/dlls/msdaps/main.c b/dlls/msdaps/main.c
index f803507..92ed78b 100644
--- a/dlls/msdaps/main.c
+++ b/dlls/msdaps/main.c
@@ -33,6 +33,8 @@
 #include "oleauto.h"
 #include "oledb.h"
 
+#include "row_server.h"
+
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(oledb);
@@ -49,11 +51,110 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
     return msdaps_DllMain(instance, reason, reserved);
 }
 
+
+/******************************************************************************
+ * ClassFactory
+ */
+typedef struct
+{
+    const IClassFactoryVtbl *lpVtbl;
+    HRESULT (*create_object)( IUnknown*, LPVOID* );
+} cf;
+
+static HRESULT WINAPI CF_QueryInterface(IClassFactory *iface, REFIID riid, void **obj)
+{
+    cf *This = (cf *)iface;
+
+    TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), obj);
+
+    if( IsEqualCLSID( riid, &IID_IUnknown ) ||
+        IsEqualCLSID( riid, &IID_IClassFactory ) )
+    {
+        IClassFactory_AddRef( iface );
+        *obj = iface;
+        return S_OK;
+    }
+    return E_NOINTERFACE;
+}
+
+static ULONG WINAPI CF_AddRef(IClassFactory *iface)
+{
+    return 2;
+}
+
+static ULONG WINAPI CF_Release(IClassFactory *iface)
+{
+    return 1;
+}
+
+static HRESULT WINAPI CF_CreateInstance(IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **obj)
+{
+    cf *This = (cf *)iface;
+    IUnknown *unk = NULL;
+    HRESULT r;
+
+    TRACE("(%p, %p, %s, %p)\n", This, pOuter, debugstr_guid(riid), obj);
+
+    r = This->create_object( pOuter, (void **) &unk );
+    if (SUCCEEDED(r))
+    {
+        r = IUnknown_QueryInterface( unk, riid, obj );
+        IUnknown_Release( unk );
+    }
+    return r;
+}
+
+static HRESULT WINAPI CF_LockServer(IClassFactory *iface, BOOL dolock)
+{
+    FIXME("(%p, %d): stub\n", iface, dolock);
+    return S_OK;
+}
+
+static const IClassFactoryVtbl CF_Vtbl =
+{
+    CF_QueryInterface,
+    CF_AddRef,
+    CF_Release,
+    CF_CreateInstance,
+    CF_LockServer
+};
+
+static cf row_server_cf = { &CF_Vtbl, create_row_server };
+static cf row_proxy_cf  = { &CF_Vtbl, create_row_marshal };
+static cf rowset_server_cf = { &CF_Vtbl, create_rowset_server };
+static cf rowset_proxy_cf  = { &CF_Vtbl, create_rowset_marshal };
+
 /***********************************************************************
  *              DllGetClassObject
  */
 HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, LPVOID *obj)
 {
+    TRACE("(%s, %s, %p)\n", debugstr_guid(clsid), debugstr_guid(iid), obj);
+
+    if (IsEqualCLSID(clsid, &CLSID_wine_row_server))
+    {
+        *obj = &row_server_cf;
+        return S_OK;
+    }
+
+    if (IsEqualCLSID(clsid, &CLSID_wine_row_proxy))
+    {
+        *obj = &row_proxy_cf;
+        return S_OK;
+    }
+
+    if (IsEqualCLSID(clsid, &CLSID_wine_rowset_server))
+    {
+        *obj = &rowset_server_cf;
+        return S_OK;
+    }
+
+    if (IsEqualCLSID(clsid, &CLSID_wine_rowset_proxy))
+    {
+        *obj = &rowset_proxy_cf;
+        return S_OK;
+    }
+
     return msdaps_DllGetClassObject(clsid, iid, obj);
 }
 
diff --git a/dlls/msdaps/row_server.c b/dlls/msdaps/row_server.c
new file mode 100644
index 0000000..982a631
--- /dev/null
+++ b/dlls/msdaps/row_server.c
@@ -0,0 +1,68 @@
+/*
+ *    Row and rowset servers / proxies.
+ *
+ * Copyright 2010 Huw Davies
+ *
+ * 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
+ */
+#include <stdarg.h>
+#include <string.h>
+
+#define COBJMACROS
+#define NONAMELESSUNION
+#define NONAMELESSSTRUCT
+
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "winuser.h"
+#include "winerror.h"
+#include "objbase.h"
+#include "oleauto.h"
+#include "oledb.h"
+
+#include "row_server.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(oledb);
+
+HRESULT create_row_server(IUnknown *outer, void **obj)
+{
+    FIXME("(%p, %p): stub\n", outer, obj);
+    *obj = NULL;
+    return E_NOTIMPL;
+}
+
+HRESULT create_rowset_server(IUnknown *outer, void **obj)
+{
+    FIXME("(%p, %p): stub\n", outer, obj);
+    *obj = NULL;
+    return E_NOTIMPL;
+}
+
+HRESULT create_row_marshal(IUnknown *outer, void **obj)
+{
+    FIXME("(%p, %p): stub\n", outer, obj);
+    *obj = NULL;
+    return E_NOTIMPL;
+}
+
+HRESULT create_rowset_marshal(IUnknown *outer, void **obj)
+{
+    FIXME("(%p, %p): stub\n", outer, obj);
+    *obj = NULL;
+    return E_NOTIMPL;
+}
diff --git a/dlls/msdaps/row_server.idl b/dlls/msdaps/row_server.idl
new file mode 100644
index 0000000..4da585f
--- /dev/null
+++ b/dlls/msdaps/row_server.idl
@@ -0,0 +1,56 @@
+/*
+ * Wine row server interface.
+ *
+ * Copyright (C) 2010 Huw Davies
+ *
+ * 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
+ */
+
+[
+    uuid(38248178-cf6d-11de-abe5-000c2916d865)
+]
+coclass wine_row_server
+{
+
+}
+
+[
+    uuid(38248179-cf6d-11de-abe5-000c2916d865)
+]
+coclass wine_row_proxy
+{
+
+}
+
+[
+    uuid(3824817a-cf6d-11de-abe5-000c2916d865)
+]
+coclass wine_rowset_server
+{
+
+}
+
+[
+    uuid(3824817b-cf6d-11de-abe5-000c2916d865)
+]
+coclass wine_rowset_proxy
+{
+
+}
+
+cpp_quote("extern HRESULT create_row_server( IUnknown*, LPVOID* );")
+cpp_quote("extern HRESULT create_row_marshal( IUnknown*, LPVOID* );")
+cpp_quote("extern HRESULT create_rowset_server( IUnknown*, LPVOID* );")
+cpp_quote("extern HRESULT create_rowset_marshal( IUnknown*, LPVOID* );")




More information about the wine-cvs mailing list