mirror of
https://github.com/Artikash/Textractor.git
synced 2024-12-24 01:14:12 +08:00
compile/link on x64
This commit is contained in:
parent
f1e7b4dc70
commit
84e9beea63
@ -7,6 +7,7 @@ set(vnrhook_src
|
|||||||
engine/match64.cc
|
engine/match64.cc
|
||||||
engine/native/pchooks.cc
|
engine/native/pchooks.cc
|
||||||
util/ithsys/ithsys.cc
|
util/ithsys/ithsys.cc
|
||||||
|
util/util.cc
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
set(vnrhook_src
|
set(vnrhook_src
|
||||||
|
@ -304,13 +304,15 @@ bool SearchResourceString(LPCWSTR str)
|
|||||||
|
|
||||||
std::vector<uint64_t> SearchMemory(const void* bytes, short length, DWORD protect)
|
std::vector<uint64_t> SearchMemory(const void* bytes, short length, DWORD protect)
|
||||||
{
|
{
|
||||||
|
SYSTEM_INFO systemInfo;
|
||||||
|
GetNativeSystemInfo(&systemInfo);
|
||||||
std::vector<std::pair<uint64_t, uint64_t>> validMemory;
|
std::vector<std::pair<uint64_t, uint64_t>> validMemory;
|
||||||
for (BYTE* probe = NULL; (uint64_t)probe < 0x80000000;) // end of user memory space
|
for (BYTE* probe = NULL; probe < systemInfo.lpMaximumApplicationAddress;)
|
||||||
{
|
{
|
||||||
MEMORY_BASIC_INFORMATION info = {};
|
MEMORY_BASIC_INFORMATION info = {};
|
||||||
if (!VirtualQuery(probe, &info, sizeof(info)))
|
if (!VirtualQuery(probe, &info, sizeof(info)))
|
||||||
{
|
{
|
||||||
probe += 0x1000; // page size
|
probe += systemInfo.dwPageSize;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user