mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
oleaut32: Use an iface instead of a vtbl pointer in IClassFactoryImpl.
This commit is contained in:
parent
8333eaa9b7
commit
e4094231a4
@ -2444,13 +2444,18 @@ static void OLEFontImpl_Destroy(OLEFontImpl* fontDesc)
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
const IClassFactoryVtbl *lpVtbl;
|
||||
LONG ref;
|
||||
IClassFactory IClassFactory_iface;
|
||||
LONG ref;
|
||||
} IClassFactoryImpl;
|
||||
|
||||
static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, IClassFactoryImpl, IClassFactory_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI
|
||||
SFCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
|
||||
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
|
||||
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
|
||||
|
||||
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
|
||||
return E_NOINTERFACE;
|
||||
@ -2458,12 +2463,12 @@ SFCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
|
||||
|
||||
static ULONG WINAPI
|
||||
SFCF_AddRef(LPCLASSFACTORY iface) {
|
||||
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
|
||||
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
|
||||
return InterlockedIncrement(&This->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI SFCF_Release(LPCLASSFACTORY iface) {
|
||||
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
|
||||
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
|
||||
/* static class, won't be freed */
|
||||
return InterlockedDecrement(&This->ref);
|
||||
}
|
||||
@ -2476,7 +2481,7 @@ static HRESULT WINAPI SFCF_CreateInstance(
|
||||
}
|
||||
|
||||
static HRESULT WINAPI SFCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
|
||||
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
|
||||
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
|
||||
FIXME("(%p)->(%d),stub!\n",This,dolock);
|
||||
return S_OK;
|
||||
}
|
||||
@ -2488,6 +2493,6 @@ static const IClassFactoryVtbl SFCF_Vtbl = {
|
||||
SFCF_CreateInstance,
|
||||
SFCF_LockServer
|
||||
};
|
||||
static IClassFactoryImpl STDFONT_CF = {&SFCF_Vtbl, 1 };
|
||||
static IClassFactoryImpl STDFONT_CF = {{&SFCF_Vtbl}, 1 };
|
||||
|
||||
void _get_STDFONT_CF(LPVOID *ppv) { *ppv = &STDFONT_CF; }
|
||||
|
@ -2379,13 +2379,18 @@ HRESULT WINAPI OleLoadPicturePath( LPOLESTR szURLorPath, LPUNKNOWN punkCaller,
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
const IClassFactoryVtbl *lpVtbl;
|
||||
LONG ref;
|
||||
IClassFactory IClassFactory_iface;
|
||||
LONG ref;
|
||||
} IClassFactoryImpl;
|
||||
|
||||
static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, IClassFactoryImpl, IClassFactory_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI
|
||||
SPCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
|
||||
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
|
||||
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
|
||||
|
||||
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
|
||||
return E_NOINTERFACE;
|
||||
@ -2393,12 +2398,12 @@ SPCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
|
||||
|
||||
static ULONG WINAPI
|
||||
SPCF_AddRef(LPCLASSFACTORY iface) {
|
||||
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
|
||||
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
|
||||
return InterlockedIncrement(&This->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI SPCF_Release(LPCLASSFACTORY iface) {
|
||||
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
|
||||
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
|
||||
/* static class, won't be freed */
|
||||
return InterlockedDecrement(&This->ref);
|
||||
}
|
||||
@ -2412,7 +2417,7 @@ static HRESULT WINAPI SPCF_CreateInstance(
|
||||
}
|
||||
|
||||
static HRESULT WINAPI SPCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
|
||||
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
|
||||
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
|
||||
FIXME("(%p)->(%d),stub!\n",This,dolock);
|
||||
return S_OK;
|
||||
}
|
||||
@ -2424,6 +2429,6 @@ static const IClassFactoryVtbl SPCF_Vtbl = {
|
||||
SPCF_CreateInstance,
|
||||
SPCF_LockServer
|
||||
};
|
||||
static IClassFactoryImpl STDPIC_CF = {&SPCF_Vtbl, 1 };
|
||||
static IClassFactoryImpl STDPIC_CF = {{&SPCF_Vtbl}, 1 };
|
||||
|
||||
void _get_STDPIC_CF(LPVOID *ppv) { *ppv = &STDPIC_CF; }
|
||||
|
Loading…
Reference in New Issue
Block a user