Not sure if there is some way to prevent this in code on my end. I get a "The handle is not valid" error from the DLL when not being logged into a character, or entering (and remaining in) an instance (World of Warcraft), which I did not get using my old ReadProcessMemory/WriteProcessMemory functions. Some pics:
I have yet to identify where in code it is occurring as I do not receive any sort of break in code, but only the error that shows is from the dll. Do you happen to know the cause, and possibly how it can be prevented?
Edit:
I found the origin of the error in my code (durp forgot to click "Break when this exception type is thrown"), and basically boils down to an invalid address being passed (seems this should be handled in the dll for invalid addresses on all reads/writes)?
Error in code is on this write:
This forces me to check each address as a precaution like the following to resolve the issue (if it occurs):
Could you make it just return defaults for each type of invalid read (this could be an optional flag, something like bool IgnoreErrors), and possibly just move on with no error if a write failed (invalid address) within the dll (maybe make your write methods return a boolean for success and suppress the error, again flag based)? I would have to create a wrapper around your code for Read/Write that first checks the address (to prevent having to check it everywhere), and returns defaults for each type otherwise (I know, I know.. I should find out why the address is taking a dump to begin with, but it would be a nice feature to add on your end imo). Any help is appreciated.
Edited by Abystus, 21 October 2013 - 09:13 AM.