LoadIcon function Null safety user32

int LoadIcon(
  1. int hInstance,
  2. Pointer<Utf16> lpIconName

Loads the specified icon resource from the executable (.exe) file associated with an application instance.

HICON LoadIconW(
  HINSTANCE hInstance,
  LPCWSTR   lpIconName


int LoadIcon(int hInstance, Pointer<Utf16> lpIconName) {
  final _LoadIcon = _user32.lookupFunction<
      IntPtr Function(IntPtr hInstance, Pointer<Utf16> lpIconName),
      int Function(int hInstance, Pointer<Utf16> lpIconName)>('LoadIconW');
  return _LoadIcon(hInstance, lpIconName);