| 61 | } |
| 62 | |
| 63 | bool ProcessMemoryWindowsProvider::read(uint64_t addr, void* buf, int len) const |
| 64 | { |
| 65 | if (!m_handle || len <= 0) return false; |
| 66 | |
| 67 | SIZE_T bytesRead = 0; |
| 68 | ReadProcessMemory(m_handle, (LPCVOID)(m_base + addr), buf, (SIZE_T)len, &bytesRead); |
| 69 | if ((int)bytesRead < len) |
| 70 | memset((char*)buf + bytesRead, 0, len - bytesRead); |
| 71 | return bytesRead > 0; |
| 72 | } |
| 73 | |
| 74 | bool ProcessMemoryWindowsProvider::write(uint64_t addr, const void* buf, int len) |
| 75 | { |
nothing calls this directly
no outgoing calls
no test coverage detected