문제

ReadProcessMemory() seems to crash my program, when it reads undefined(?) memory.
Well my question is, how can I check if the address is undefined or whatever before I use ReadProcessMemory to avaoid crashes?

The errormessage btw:

Unhandled exception at 0x00ce1c70 in Program.exe: 0xC0000005: Access violation writing location 0x00e3f000.

도움이 되었습니까?

해결책

The crash is not coming because you are reading invalid / undefined memory, it is coming because you passed an invalid buffer into ReadProcessMemory. Note that the the error message says violation writing, not reading.

You need to make sure the buffer you are passing is appropriately sized for the data amount that you are requesting. If you post the code used to call the method we may be able to help spot the error

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top