News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Memory Control

Started by jckl, March 27, 2006, 06:24:26 PM

Previous topic - Next topic

jckl

I am writing functions to read and write to a processes memory and have it working but using API. I was wondering if there is a way to do it with the API call.. This is my function to read a byte.



ReadDataBYTE proc mAddress:DWORD
  LOCAL bBuff:DWORD

  and bBuff, 0
  Invoke ReadProcessMemory, ProcessHandle, mAddress, ADDR bBuff, 1, NULL
  mov eax, bBuff
  ret
ReadDataBYTE endp

Tedd

Quote from: jckl on March 27, 2006, 06:24:26 PM
I ... have it working but using API. ....a way to do it with the API call.. ....

With? or Without? :bdg

You can't access the memory of another process without going through the api. It requires you to interact with the OS, and tell the OS to do it.
Technically it could be possible to do everything the OS does when you call this function, but that's just the same as calling the function.
The only safe way to do it is through the api.
No snowflake in an avalanche feels responsible.

jckl

ok.. that answers my question.. thanks