dwrite.h has a few issues which prevent it from being used in C. It has overloaded methods in some of the vtbl structs, some COBJMACROS defines are missing the initial This parameter and some method definitions are missing the THIS_ macro.
libass is considering DirectWrite for font selection, but they would prefer to use it from C. They currently solve these issues by including a stripped-down dwrite.h and a .diff for fixing these issues in the current mingw-w64 version, but it would be nice to have these issues fixed upstream:
https://raw.githubusercontent.com/libass/libass/fonts/libass/dwrite.h
https://raw.githubusercontent.com/libass/libass/fonts/dwrite.diff
The latest Wine version of this header (generated with widl) doesn't have these problems either, so it seems like this can be solved by updating to it. The Wine headers also use DEFINE_GUID for the interface GUIDs, so they don't have to be redefined in C source (__CRT_UUID_DECL seems to only work from C++.)
Well, I don't think this is needed any more. The Platform SDK's dwrite.h doesn't work from C either, and for that reason, libass decided to always use their own dwrite_c.h header:
https://raw.githubusercontent.com/libass/libass/master/libass/dwrite_c.h