Skip to main content
IsWow64Process2 function

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

Syntax


BOOL WINAPI IsWow64Process2(
  _In_      HANDLE hProcess,
  _Out_     USHORT *pProcessMachine,
  _Out_opt_ USHORT *pNativeMachine
);

Parameters

hProcess [in]

A handle to the process. The handle must have the PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION access right. For more information, see Process Security and Access Rights.

pProcessMachine [out]

On success, returns a pointer to an IMAGE_FILE_MACHINE_* value. The value will be IMAGE_FILE_MACHINE_UNKNOWN if the target process is not a WOW64 process; otherwise, it will identify the type of WoW process.

pNativeMachine [out, optional]

On success, returns a pointer to a possible IMAGE_FILE_MACHINE_* value identifying the native architecture of host system.

Return value

If the function succeeds, the return value is a nonzero value.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

IsWow64Process2 provides an improved direct replacement for IsWow64Process. In addition to determining if the specified process is running under WOW64, IsWow64Process2 returns the following information:

  • Whether the target process, specified by hProcess, is running under Wow or not.
  • The architecture of the target process.
  • Optionally, the architecture of the host system.

Requirements

Minimum supported client

Windows 10, version 1511 [desktop apps | UWP apps]

Minimum supported server

Windows Server 2016 [desktop apps | UWP apps]

Header

Wow64apiset.h

Library

Kernel32.lib

DLL

Kernel32.dll