FindResourceEx function Null safety kernel32

int FindResourceEx(
  1. int hModule,
  2. Pointer<Utf16> lpType,
  3. Pointer<Utf16> lpName,
  4. int wLanguage
)

Determines the location of the resource with the specified type, name, and language in the specified module.

HRSRC FindResourceExW(
  HMODULE hModule,
  LPCWSTR  lpType,
  LPCWSTR  lpName,
  WORD    wLanguage
);

Implementation

int FindResourceEx(
    int hModule, Pointer<Utf16> lpType, Pointer<Utf16> lpName, int wLanguage) {
  final _FindResourceEx = _kernel32.lookupFunction<
      IntPtr Function(IntPtr hModule, Pointer<Utf16> lpType,
          Pointer<Utf16> lpName, Uint16 wLanguage),
      int Function(int hModule, Pointer<Utf16> lpType, Pointer<Utf16> lpName,
          int wLanguage)>('FindResourceExW');
  return _FindResourceEx(hModule, lpType, lpName, wLanguage);
}