当前位置:网站首页>The iswow64process function determines the number of program bits
The iswow64process function determines the number of program bits
2022-04-23 20:38:00 【Cambridge art student】
IsWow64Process The return value is TRUE&FALSE, stay MSDN The explanation and definition are as follows :
BOOL IsWow64Process(
HANDLE hProcess, // Target process handle
PBOOL Wow64Process // Inverse value TRUE&FALSE
);
The IsWow64Process function determines whether the specified process is running under WOW64.
in other words IsWow64Process Function is used to determine whether the specified process is in WOW64 Run in a virtual environment . In fact, this function does not have the function of judging the number of digits in essence . However, through the analysis of a given function example, it is not difficult for us to get a popular explanation of the return value of the function .
Target program | Windows A virtual environment | Return value |
---|---|---|
64-bit | 64-bit | FALSE |
32-bit | 64-bit | TRUE |
32-bit | 32-bit | FALSE |
Therefore, the true number of bits of the target cannot be obtained only according to the return value , We might as well add the judgment of system digits , Make two comparisons , It's easy to get the number of target processes ! use GetNativeSystemInfo Function to judge the number of bits of the system, which will not be repeated here , Here's how to use IsWow64Process Function to judge the target process !
DWORD IsTargetArchitecture()
{
BOOL IsWow64;
DWORD TargetArchitecture = X86;
HANDLE ProcessHandle;
if (!IsWow64Process(ProcessHandle, &IsWow64)) // Determine whether the function
{
return FALSE;
}
if (IsWow64) // really 32 position
{
TargetArchitecture = X86; // Target process bits
}
else {
SYSTEM_INFO SystemInfo = {
0 };
GetNativeSystemInfo(&SystemInfo); // Get system information
if (SystemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) // Get the number of bits in the system 64
TargetArchitecture = X64;
else if (SystemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL)// Get the number of bits in the system 32
TargetArchitecture = X86;
else
return FALSE;
}
return TargetArchitecture;
}
版权声明
本文为[Cambridge art student]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210546556672.html
边栏推荐
- [graph theory brush question-5] Li Kou 1971 Find out if there is a path in the graph
- DOS command of Intranet penetration
- Experience of mathematical modeling in 18 year research competition
- JSX syntax rules
- SQL Server connectors by thread pool 𞓜 instructions for dtsqlservertp plug-in
- LeetCode 1346、检查整数及其两倍数是否存在
- What is the difference between a host and a server?
- Leetcode 232, queue with stack
- How to protect ECs from hacker attacks?
- How many hacking methods do you know?
猜你喜欢
A login and exit component based on token
Imitation Baidu map realizes the three buttons to switch the map mode by automatically shrinking the bottom
After route link navigation, the sub page does not display the navigation style problem
Devexpress 14.1 installation record
Plato farm is one of the four largest online IEOS in metauniverse, and the transaction on the chain is quite high
Actual measurement of automatic ticket grabbing script of barley network based on selenium (the first part of the new year)
Solution: NPM err! code ELIFECYCLE npm ERR! errno 1
Install MySQL 5.0 under Linux 64bit 6 - the root password cannot be modified
Case of the third day of go language development fresh every day project - news release system II
SQL Server Connectors By Thread Pool | DTSQLServerTP plugin instructions
随机推荐
Leetcode 1346. Check whether integers and their multiples exist
Thirty What are VM and VC?
Recognition of high-speed road signs by Matlab using alexnet
BMP JPEG 图片转换为矢量图像 ContourTrace
Operation of numpy array
三十一. `prototype`显示原型属性和`__proto__`隐式原型属性
Mathematical modeling column | Part 5: MATLAB optimization model solving method (Part I): Standard Model
Shanghai a répondu que « le site officiel de la farine est illégal »: l'exploitation et l'entretien négligents ont été « noirs » et la police a déposé une plainte
A login and exit component based on token
SQL: query duplicate data and delete duplicate data
XXXI` Prototype ` displays prototype properties and`__ proto__` Implicit prototype properties
LeetCode 994、腐烂的橘子
【PTA】L1-006 连续因子
PostgreSQL basic functions
Commit and ROLLBACK in DCL of 16mysql
Vscode download speed up
ABAQUS script email auto notification
Flex layout
How can matlab obtain the truncated image in trainingimagelabeler
【SQL】字符串系列2:将一个字符串根据特定字符分拆成多行