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

This commit is contained in:
Huw Davies 2010-01-21 11:53:25 +00:00 committed by Alexandre Julliard
parent 0d519bdfd7
commit de6f38108a
5 changed files with 231 additions and 2 deletions

2
.gitignore vendored
View file

@ -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

View file

@ -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

View file

@ -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);
}

68
dlls/msdaps/row_server.c Normal file
View file

@ -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;
}

View file

@ -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* );")