Commit 1c0982e8 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

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

parent ed5260ba
......@@ -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
......
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