-
Reading from stdout
I'm trying to figure out a way to attach to a games stdout and write everything it sees to a text file. How would I go about doing this? The game is very old (around 8 years) and is called Dark Age of Camelot. It was written in C++ (dunno if that helps).
-
There's no standard way of doing it. You can redirect the output to a pipe, and then read that. How you do that depends on what platform you're on.
In most shells you can just use the > operator to redirect the output to a file, so you don't even have to write a program for it.
-
I'm running windows xp x64. I've got cygwin installed as well.
How would I do it then? It seems pretty basic but I don't know what to google.
-
You should be able to launch the program using cmd.exe. Just use the redirect operator I showed you above.
http://technet.microsoft.com/en-us/l.../bb490982.aspx
-
The issue is, the initial camelot.exe spawns a child process game.dll, and camelot.exe then terminates. Is there a way to work around this? I've tried launching game.dll from the command line, and it works in that it asks if I want to launch another game, but it doesn't successfully do it.
Is there a way I can attach to the initial process, and any child processes it may have?