GetBinaryType function Null safety kernel32

int GetBinaryType(
  1. Pointer<Utf16> lpApplicationName,
  2. Pointer<Uint32> lpBinaryType

Determines whether a file is an executable (.exe) file, and if so, which subsystem runs the executable file.

BOOL GetBinaryTypeW(
  LPCWSTR lpApplicationName,
  LPDWORD lpBinaryType);


int GetBinaryType(
    Pointer<Utf16> lpApplicationName, Pointer<Uint32> lpBinaryType) {
  final _GetBinaryType = _kernel32.lookupFunction<
      Int32 Function(
          Pointer<Utf16> lpApplicationName, Pointer<Uint32> lpBinaryType),
      int Function(Pointer<Utf16> lpApplicationName,
          Pointer<Uint32> lpBinaryType)>('GetBinaryTypeW');
  return _GetBinaryType(lpApplicationName, lpBinaryType);