当前位置:网站首页>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
边栏推荐
- Plato Farm元宇宙IEO上线四大,链上交易颇高
- Leetcode 994, rotten orange
- 内网渗透之DOS命令
- Resolve the error - error identifier 'attr_ id‘ is not in camel case camelcase
- Introduction to standardization, regularization and normalization
- . Ren -- the intimate artifact in the field of vertical Recruitment!
- Imitation Baidu map realizes the three buttons to switch the map mode by automatically shrinking the bottom
- bounding box iou
- Syntaxerror: unexpected token r in JSON at position 0
- Es error: request contains unrecognized parameter [ignore_throttled]
猜你喜欢

Automatically fill in body temperature and win10 task plan

Come in and teach you how to solve the problem of port occupation

How to configure SSH public key in code cloud

Click an EL checkbox to select all questions
![[PTA] l1-002 printing hourglass](/img/9e/dc715f7debf7edb7a40e9ecfa69cef.png)
[PTA] l1-002 printing hourglass
![Es error: request contains unrecognized parameter [ignore_throttled]](/img/17/9131c3eb023b94b3e06b0e1a56a461.png)
Es error: request contains unrecognized parameter [ignore_throttled]

16MySQL之DCL 中 COMMIT和ROllBACK
![[latex] 5 how to quickly write out the latex formula corresponding to the formula](/img/1f/3c5a332ce1d6852dde38040faea5bf.png)
[latex] 5 how to quickly write out the latex formula corresponding to the formula

Actual measurement of automatic ticket grabbing script of barley network based on selenium (the first part of the new year)

【PTA】L1-002 打印沙漏
随机推荐
Numpy mathematical function & logical function
SQL Server connectors by thread pool 𞓜 instructions for dtsqlservertp plug-in
Recommend an open source free drawing software draw IO exportable vector graph
2021-06-29 C escape character cancellation and use
Plato farm is one of the four largest online IEOS in metauniverse, and the transaction on the chain is quite high
【PTA】整除光棍
Browser - learning notes
How to use PM2 management application? Come in and see
Preliminary understanding of cache elimination algorithm (LRU and LFU)
Solution to PowerDesigner's failure to connect to MySQL in x64 system
2021-09-02 unity project uses rider to build hot change project failure record of ilruntime
LeetCode 709、转换成小写字母
6-5 string - 2 String copy (assignment) (10 points) the C language standard function library includes the strcpy function for string copy (assignment). As an exercise, we write a function with the sam
Come in and teach you how to solve the problem of port occupation
Why does ES6 need to introduce map when JS already has object type
Scrapy教程 - (2)寫一個簡單爬蟲
【SQL】字符串系列2:将一个字符串根据特定字符分拆成多行
2022DASCTF Apr X FATE 防疫挑战赛 CRYPTO easy_real
Markdown < a > tag new page open link
【栈和队列专题】—— 滑动窗口