Hi,
at the moment I'm writing a little Linux based program to read some variables from a Windows application. But my problem is, that i can't access to the virtual memory of the Win App running under wine. I don't know how to do this. c/c++ isn't the problem but the right way to do it.
I've already read the wineserver's main.c and fd.c but I think that it's not a good way to put a code into, which give's me the chance to read something. I need sth to connect, like /dev/mem or a network port.
My second idea was the wine debugger. Is it possible to get access the application memory at runtime from this? I mean, without stopping the application?
I hope you can help me and I've described my problem as clear as possible ;)
Greetings, Kai
at the moment I'm writing a little Linux based program to read some variables from a Windows application. But my problem is, that i can't access to the virtual memory of the Win App running under wine. I don't know how to do this. c/c++ isn't the problem but the right way to do it.
ReadProcessMemory? You can only call that from a winelib app (or another windows executable), so if your app can't be a winelib app, you might have to resort to the usual trick: create a winelib app that does what you want, and connect to it via a socket.
--Juan
On Sunday 09 December 2007, Kai Lauterbach wrote:
Hi,
at the moment I'm writing a little Linux based program to read some variables from a Windows application. But my problem is, that i can't access to the virtual memory of the Win App running under wine. I don't know how to do this. c/c++ isn't the problem but the right way to do it.
On Linux, you'd typically use ptrace(). You PTRACE_ATTACH to the process (which becomes your child), wait() for the child to actually stop (attaching sends it SIGSTOP), you can then use PTRACE_PEEK/POKE to read/write process's memory.
Looks easy on paper, at least.
Cheers, Kuba