I'm facing a problem which I'm killing myself over. I have the following code:
ComPtr<IDWriteFactory> factory;
DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory), factory.GetAddressOf();
ComPtr<IDWriteTextFormat> textFormat;
factory->CreateTextFormat(L"Arial", nullptr, DWRITE_FONT_WEIGHT_NORMAL,
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 20.0f, nullptr,
textFormat.GetAddressOf());
After the last line textFormat points to null. CreateTextFormat() returns the value E_INVALIDARG. I definitely have Arial installed, the two nullptr parameters are allowed according to MSDN, so I don't see what can be invalid. Can anyone shed some light on this?