mirror of
https://github.com/Artikash/Textractor.git
synced 2024-12-24 01:14:12 +08:00
bugfix getmemoryrange
This commit is contained in:
parent
34082f31ed
commit
79b2782dab
@ -60,13 +60,13 @@ DWORD SearchPattern(DWORD base, DWORD base_length, LPCVOID search, DWORD search_
|
|||||||
|
|
||||||
DWORD IthGetMemoryRange(LPCVOID mem, DWORD *base, DWORD *size)
|
DWORD IthGetMemoryRange(LPCVOID mem, DWORD *base, DWORD *size)
|
||||||
{
|
{
|
||||||
MEMORY_BASIC_INFORMATION info;
|
MEMORY_BASIC_INFORMATION info = {};
|
||||||
VirtualQuery(mem, &info, sizeof(info));
|
VirtualQuery(mem, &info, sizeof(info));
|
||||||
if (base)
|
if (base)
|
||||||
*base = (DWORD)info.BaseAddress;
|
*base = (DWORD)info.BaseAddress;
|
||||||
if (size)
|
if (size)
|
||||||
*size = info.RegionSize;
|
*size = info.RegionSize;
|
||||||
return info.Protect;
|
return info.Protect > PAGE_NOACCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline DWORD GetHash(LPSTR str)
|
inline DWORD GetHash(LPSTR str)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user