Commit e57ab97f authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

oleaut32: Implement IClassFactory::QueryInterface() for StdFont object.

parent ff934e82
......@@ -2229,11 +2229,21 @@ 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) {
static HRESULT WINAPI SFCF_QueryInterface(IClassFactory *iface, REFIID riid, void **obj)
{
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), obj);
*obj = NULL;
if (IsEqualIID(&IID_IClassFactory, riid) || IsEqualIID(&IID_IUnknown, riid))
{
*obj = iface;
IClassFactory_AddRef(iface);
return S_OK;
}
return E_NOINTERFACE;
}
......
......@@ -1230,6 +1230,7 @@ static void test_realization(void)
static void test_OleCreateFontIndirect(void)
{
FONTDESC fontdesc;
IUnknown *unk, *unk2;
IFont *font;
HRESULT hr;
......@@ -1261,6 +1262,20 @@ static void test_OleCreateFontIndirect(void)
hr = pOleCreateFontIndirect(&fontdesc, &IID_IFont, (void**)&font);
EXPECT_HR(hr, S_OK);
IFont_Release(font);
hr = OleInitialize(NULL);
ok(hr == S_OK, "got 0x%08x\n", hr);
hr = CoGetClassObject(&CLSID_StdFont, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void**)&unk);
ok(hr == S_OK, "got 0x%08x\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void**)&unk2);
ok(hr == S_OK, "got 0x%08x\n", hr);
IUnknown_Release(unk);
IUnknown_Release(unk2);
OleUninitialize();
}
START_TEST(olefont)
......
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