当前位置:网站首页>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
边栏推荐
- ArcGIS js api 4. X submergence analysis and water submergence analysis
- Psychological formula for converting RGB to gray value
- 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
- go-zero框架数据库方面避坑指南
- LeetCode 1337、矩阵中战斗力最弱的 K 行
- 【PTA】L1-002 打印沙漏
- Leetcode 709, convert to lowercase
- How can matlab obtain the truncated image in trainingimagelabeler
- SQL Server Connectors By Thread Pool | DTSQLServerTP plugin instructions
- Use of node template engine
猜你喜欢
Numpy mathematical function & logical function
[PTA] get rid of singles
Go zero framework database avoidance Guide
2021-09-02 unity project uses rider to build hot change project failure record of ilruntime
Preliminary understanding of cache elimination algorithm (LRU and LFU)
Mathematical modeling column | Part 5: MATLAB optimization model solving method (Part I): Standard Model
Customize timeline component styles
【PTA】整除光棍
堡垒机、跳板机JumpServer的搭建,以及使用,图文详细
【PTA】L1-002 打印沙漏
随机推荐
Resolve the error - error identifier 'attr_ id‘ is not in camel case camelcase
Operation of numpy array
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
Click an EL checkbox to select all questions
LeetCode 1346、检查整数及其两倍数是否存在
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
Implementation of mypromise
Resolve the eslint warning -- ignore the warning that there is no space between the method name and ()
JSX syntax rules
Common form verification
On BIM data redundancy theory
Analysis of the relationship between generalized Bim and CAD under the current background
Unity asset import settings
Vscode download speed up
高薪程序员&面试题精讲系列91之Limit 20000加载很慢怎么解决?如何定位慢SQL?
How to use PM2 management application? Come in and see
Introduction to standardization, regularization and normalization
Leetcode 74. Search two-dimensional matrix
[latex] 5 how to quickly write out the latex formula corresponding to the formula
How to configure SSH public key in code cloud