Re: reading memory addresses
Im pretty sure your assumption about memory swapping is correct. You MIGHT get lucky and it would be the same address but its an extremely slim chance.
As for wanting to monitor an address regardless of program activity (shutdown, startup, etc...) I really dont know how you would do that... But I dont think it would be with C#. Your probably looking at a lower level language such as C.
Maybe if you could get a handle to the process and get access to its variables by some way of interop you could do it. But then it may not work anyway if the application shuts down.
Re: reading memory addresses
What you need to do is identify the starting memory address for the process and then work out the offset to the piece of data you're interested in. That way upon reboot you can identify the new starting address and the offset will always remain the same.
Unfortunately I'm also not much use as I don't have the code to do that, but I would hope C# offers that functionality. If not you'll find a line or two of C++ will do the job, which you can probably wrap up to access via C# if you need to.
Re: reading memory addresses
ok, thats what i was afraid of, i read your reply about 3 hours ago and have been searching ever sense, i haven't been able to find anything yet, so if anyone can find any code in any language that i can use to throw together a dll, it'd be greatly appreciated, i just need to be able to get the base memory address of any process, then i think i can calculate the offset.....
]
Re: reading memory addresses
A user level process (ie a normal program) can NOT read the memory addresses of another process. Period. Independant of Language.
Just think about what the security ramifications would be if this were possible.... :eek: :eek: :eek: :eek: :eek: :eek:
Re: reading memory addresses
I believe it used to be possible with the old 80186 Intel based CPU's (circa 1982). They didn't have protected mode. The 80286 introduced that I think.
The 80186 CPU was also an 8-bit CPU, so basically no applications written today would run properly on it. That and its like, 20+ years old, haha.