Skip to content

ReadProcessMemory with nuint #945

Answered by AArnott
Lightczx asked this question in Q&A
Discussion options

You must be logged in to vote

I notice the dwSize parameter type in your working example is declared as int in your 64-bit process, but the docs and headers and win32metadata suggest it should be pointer-sized (i.e. nuint). That's the only significant difference between your declaration and the one from CsWin32. And I'd lean toward CsWin32's being the correct one, so I'm surprised by your report that yours works and Cswin32's doesn't.

I don't know enough about how to use this function to test it locally however. Can you provide a full console app that perhaps spawns notepad.exe and reads anything from it so I can experiment?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Lightczx
Comment options

Answer selected by Lightczx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants