Link to home
Create AccountLog in
Avatar of Ventura_v
Ventura_v

asked on

Read string in a variable with ReadProcessMemory

Hello Experts,

In another post I asked this and ciuly came with an answer that involves using pchar instead of string... well, now it can't be pchar... Is there any way to get the string of a variable in another program??
ASKER CERTIFIED SOLUTION
Avatar of 2266180
2266180
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Ventura_v
Ventura_v

ASKER

Hmm, what if I dont know the memory address of the variable?? Sould I find it's base address and then scan from that?? How do I do it??
as I explained this to you in the module handle question, finding the right address is a pain. either you know that it is always there, in which case you use a disassembler or a debugger and find and hardcode the address (you will have a bas address which yuo will translate to the process address) or you must have some way of correctly finding the address.

all this is not childs play. if you don't understand these things I am explaining to you or have previous knowledge of such stuff it will be impossible for you to do it. I'm not even sure where to start and I understand all these things.

bottom line: playing with other process memory is generally deemed as bad. there are a ton of ways to make 2 processes communicate and you should use that. in the rare case of having an application whos source was lost or something, hire someone who knows about these things. in the end it will be cheaper.