AddFontResourceEx function Null safety gdi32

int AddFontResourceEx(
  1. Pointer<Utf16> name,
  2. int fl,
  3. Pointer<NativeType> res
)

The AddFontResourceEx function adds the font resource from the specified file to the system. Fonts added with the AddFontResourceEx function can be marked as private and not enumerable.

int AddFontResourceExW(
  LPCWSTR name,
  DWORD   fl,
  PVOID   res
);

Implementation

int AddFontResourceEx(Pointer<Utf16> name, int fl, Pointer res) {
  final _AddFontResourceEx = _gdi32.lookupFunction<
      Int32 Function(Pointer<Utf16> name, Uint32 fl, Pointer res),
      int Function(
          Pointer<Utf16> name, int fl, Pointer res)>('AddFontResourceExW');
  return _AddFontResourceEx(name, fl, res);
}