LoadImage function Null safety user32

int LoadImage(
  1. int hInst,
  2. Pointer<Utf16> name,
  3. int type,
  4. int cx,
  5. int cy,
  6. int fuLoad
)

Loads an icon, cursor, animated cursor, or bitmap.

HANDLE LoadImageW(
  HINSTANCE hInst,
  LPCWSTR   name,
  UINT      type,
  int       cx,
  int       cy,
  UINT      fuLoad
);

Implementation

int LoadImage(
    int hInst, Pointer<Utf16> name, int type, int cx, int cy, int fuLoad) {
  final _LoadImage = _user32.lookupFunction<
      IntPtr Function(IntPtr hInst, Pointer<Utf16> name, Uint32 type, Int32 cx,
          Int32 cy, Uint32 fuLoad),
      int Function(int hInst, Pointer<Utf16> name, int type, int cx, int cy,
          int fuLoad)>('LoadImageW');
  return _LoadImage(hInst, name, type, cx, cy, fuLoad);
}