Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spawn a new console and write to it at run-time (in windows)

Status
Not open for further replies.

RealityVelJackson

Programmer
Aug 6, 2005
10
0
0
US
I am writing a multithreaded 'chatroom' style server that constantly broadcasts the messages it receives to all the clients so that they can watch the discussion unfold. Upon a client's successful connection to the server, the client creates a new thread. From inside this thread I would like to spawn a new console window, possibly using:
Code:
systen("start cmd");
and then echo received (broadcasted) strings to the new console possibly using:
Code:
char* command = "echo ";
strcat(command, receivedString);
system(command);

On a UNIX machine, I have an idea of how to write to open processes, but I don't know how to do this using windows.

Any suggestions ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top