Код: Выделить всё
if (memInfo.State == MEM_COMMIT && memInfo.Protect != PAGE_NOACCESS && memInfo.Protect) {
address = reinterpret_cast(memInfo.BaseAddress);
buffer.resize(memInfo.RegionSize);
SIZE_T bytesRead;
if (ReadProcessMemory(process, reinterpret_cast(address), buffer.data(), memInfo.RegionSize, &bytesRead)) {
size_t bytesToSearch = min(bytesRead, memInfo.RegionSize);
for (size_t i = 0; i
Подробнее здесь: [url]https://stackoverflow.com/questions/78961768/why-does-readprocessmemory-299-error-happen-how-do-i-make-it-read-fully-instead[/url]