IsWow64Process
The IsWow64Process function determines whether the current process is running under WOW64 (Windows 32-bit On Windows 64-bit). WOW64 is a layer of the operating system that allows 32-bit applications to run on 64-bit versions of Windows.
Syntax
BOOL IsWow64Process( HANDLE hProcess, PBOOL Wow64Process );
Parameters
| Parameter | Type | Description |
|---|---|---|
hProcess |
HANDLE |
A handle to the process to be queried. This handle must have the PROCESS_QUERY_INFORMATION access right. For more information, see Process Security and Access Rights. |
Wow64Process |
PBOOL |
A pointer to a boolean value that receives the WOW64 status. If this parameter is TRUE, the process is running under WOW64. If this parameter is FALSE, the process is a native 64-bit process. |
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
The IsWow64Process function returns whether the process identified by hProcess is a 32-bit process running under WOW64. This is important for detecting whether your application is running in a 32-bit or 64-bit environment.
To check the current process, you can pass GetCurrentProcess() as the hProcess parameter.
Important: This function is not supported on 32-bit versions of Windows. If you call this function on a 32-bit operating system, the function will fail and
GetLastError will return ERROR_NOT_SUPPORTED.
Requirements
| Attribute | Value |
|---|---|
| Minimum supported client | Windows Vista |
| Minimum supported server | Windows Server 2008 |
| Header | Winbase.h |
| Library | Kernel32.lib |
| DLL | Kernel32.dll |