Jump to content

ConsoleWrite from another process


Recommended Posts

I have 2 processes one is Manager another is Worker.exe
Master launches worker by Run with parameters directive passing PID of Manager as well
I'm trying to reassign console from worker to the master so I will see some info from worker

 I called FreeConsole and _WinAPI_AttachConsole to Manager's PID.

$workerID=$CmdLine[1];
...
 $ManagerPID=$CmdLine[4];


 $res=_WinAPI_FreeConsole();
 $res2=_WinAPI_AttachConsole($ManagerPID);


 ConsoleWrite(" worker "&$workerID&" connected to console ");

 

I don't see any console messages from worker in my SciTE console window where Manager's console lives
Any ideas why?
 

Edited by Broadcastic
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...