[1/5]dwrite: Implement Font File Loader registration

Nikolay Sivov nsivov at codeweavers.com
Fri Aug 8 11:43:59 CDT 2014

> +static HRESULT WINAPI fontfileloader_QueryInterface(IDWriteFontFileLoader *iface, REFIID riid, void **obj)
> +{
> +    *obj = iface;
> +    return S_OK;
> +}

This should follow normal QI behavior, with test failure on unexpected 

> +static HRESULT WINAPI fontfileloader_CreateStreamFromKey(IDWriteFontFileLoader *iface, const void *fontFileReferenceKey, UINT32 fontFileReferenceKeySize, IDWriteFontFileStream **fontFileStream)
> +{
> +    return 0x8faecafe;

I'm sure this works, but it's cleaner to return E_FAIL/E_NOTIMPL imho.

> +    hr = IDWriteFactory_RegisterFontFileLoader(factory, &floader);
> +    ok(hr == S_OK, "got 0x%08x\n", hr);

Probably it makes sense to test NULL argument as well, but that's 
certainly optional (and dwrite tends to crash in such cases).

More information about the wine-devel mailing list