I am trying to gather some experience with DirectWrite but I am failing to create the factory:
I have a C++ (CLR) class
public ref class TextFormat{
internal:
static IDWriteFactory* pBaseFactory;
.....
public:
TextFormat(String^ FontFamilyName, FontWeights FontWeight,
FontStyles FontStyle, FLOAT FontSize);
....
}
and a .cpp file with the code
.....
HRESULT HResult = DWriteCreateFactory(
DWRITE_FACTORY_TYPE_SHARED,
__uuidof(IDWriteFactory),
reinterpret_cast<IUnknown**>(&pBaseFactory));
.....
The compiler complains about the reinterpretcast "Invalid type conversion". I think I have copied the existing examples good enough and I do not see why the cast is failing.