当前位置:网站首页>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
边栏推荐
- Numpy sort search count set
- Preliminary understanding of cache elimination algorithm (LRU and LFU)
- A useless confession artifact
- 打新债中签以后怎么办,网上开户安全吗
- 【PTA】整除光棍
- Leetcode 20. Valid parentheses
- Commit and ROLLBACK in DCL of 16mysql
- Click an EL checkbox to select all questions
- 2022DASCTF Apr X FATE 防疫挑战赛 CRYPTO easy_real
- Devaxpress report replay: complete the drawing of conventional two-dimensional report + histogram + pie chart
猜你喜欢
上海回應“面粉官網是非法網站”:疏於運維被“黑”,警方已立案
On BIM data redundancy theory
"Meta function" of tidb 6.0: what is placement rules in SQL?
【PTA】L1-002 打印沙漏
A login and exit component based on token
Commit and ROLLBACK in DCL of 16mysql
LeetCode 542、01 矩阵
Vscode download speed up
Recognition of high-speed road signs by Matlab using alexnet
Plato Farm元宇宙IEO上线四大,链上交易颇高
随机推荐
Elastic box model
. Ren -- the intimate artifact in the field of vertical Recruitment!
[stack and queue topics] - sliding window
Async function ------ ES6
Operation of numpy array
2021-06-29 C escape character cancellation and use
GO语言开发天天生鲜项目第三天 案例-新闻发布系统二
[graph theory brush question-5] Li Kou 1971 Find out if there is a path in the graph
Vulnhub DC: 1 penetration notes
LeetCode 20、有效的括号
[PTA] l1-006 continuity factor
Leetcode 74. Search two-dimensional matrix
What is the difference between a host and a server?
LeetCode 232、用栈实现队列
go-zero框架数据库方面避坑指南
Shanghai responded that "flour official website is an illegal website": neglect of operation and maintenance has been "hacked", and the police have filed a case
Linux64Bit下安装MySQL5.6-不能修改root密码
GO語言開發天天生鮮項目第三天 案例-新聞發布系統二
Automatically fill in body temperature and win10 task plan
How many hacking methods do you know?