I never tested them sorry if I messed them up.
I used buf() = vbnullstring to show a fail state by returning an array with a Ubound of -1 and an Lbound of 0. It appears that StrConv can't handle that although it can handle a null string (which is what the fail state buf() converts to). To avoid the error you could use...Unfortunately if buf() is in it's fail state then the function has failed somehow, either because one or more of the parameters is incorrect or more likely because readsz has returned 0 where it should return the number of bytes read, which all going well should be the same as Size.Code:sTest = StrConv(CStr(ReadProcessBytes(hWnd, Address, Size)), vbUnicode)
Can you show me the declares you have used for Read/WriteProcessMemory and can you confirm that you are not using On Error Resume Next.
Edit: No need, I see the code you posted is just a cut and paste from Allapi, I assume you are using the declares from there as well. I'll test them at some point later today to see If I notice anything.




Reply With Quote