oledb32: Use an iface instead of a vtbl pointer in IClassFactoryImpl.

This commit is contained in:
Michael Stefaniuc 2010-12-05 15:17:05 +01:00 committed by Alexandre Julliard
parent ed5260ba92
commit 1c0982e85f

View file

@ -59,13 +59,18 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID lpv)
*/
typedef struct
{
const IClassFactoryVtbl *lpVtbl;
IClassFactory IClassFactory_iface;
HRESULT (*create_object)( IUnknown*, LPVOID* );
} cf;
static inline cf *impl_from_IClassFactory(IClassFactory *iface)
{
return CONTAINING_RECORD(iface, cf, IClassFactory_iface);
}
static HRESULT WINAPI CF_QueryInterface(IClassFactory *iface, REFIID riid, void **obj)
{
cf *This = (cf *)iface;
cf *This = impl_from_IClassFactory(iface);
TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), obj);
@ -91,7 +96,7 @@ static ULONG WINAPI CF_Release(IClassFactory *iface)
static HRESULT WINAPI CF_CreateInstance(IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **obj)
{
cf *This = (cf *)iface;
cf *This = impl_from_IClassFactory(iface);
IUnknown *unk = NULL;
HRESULT r;
@ -121,7 +126,7 @@ static const IClassFactoryVtbl CF_Vtbl =
CF_LockServer
};
static cf oledb_convert_cf = { &CF_Vtbl, create_oledb_convert };
static cf oledb_convert_cf = { { &CF_Vtbl }, create_oledb_convert };
/******************************************************************
* DllGetClassObject