IsWow64Process2 function Null safety kernel32

int IsWow64Process2 (
  1. int hProcess,
  2. Pointer<Uint16> pProcessMachine,
  3. Pointer<Uint16> pNativeMachine
)

Determines whether the specified process is running under WOW64. Also returns additional machine process and architecture information.

BOOL IsWow64Process2(
  HANDLE hProcess,
  USHORT *pProcessMachine,
  USHORT *pNativeMachine
);

Implementation

int IsWow64Process2(int hProcess, Pointer<Uint16> pProcessMachine,
    Pointer<Uint16> pNativeMachine) {
  final _IsWow64Process2 = _kernel32.lookupFunction<
      Int32 Function(IntPtr hProcess, Pointer<Uint16> pProcessMachine,
          Pointer<Uint16> pNativeMachine),
      int Function(int hProcess, Pointer<Uint16> pProcessMachine,
          Pointer<Uint16> pNativeMachine)>('IsWow64Process2');
  return _IsWow64Process2(hProcess, pProcessMachine, pNativeMachine);
}