![]() |
|
#1
|
|||
|
|||
Help communicating between console processes/threads???I'm not exactly sure how to state the problem. This is all new ground for me.
I'll done googles but a lot of what I found confused me a little more then I expected. First, in lame man terms, can some one explain the difference between processes and threads? Second, is it possible to share variables (memory addresses) between console windows? Third, is it possible to have one console window write to another console window? Here is the real issue I'm trying to solve. We have Team Center AE (process name imanserver.exe) sessions running on a client workstation. This is a UGS database software application. It is launched through a command window from a batch (.bat) file that sets many environment variables. The user may have multiple sessions running on the client at one time, and each session can be connected to the same database or different databases. Each session has a process, imanserver.exe, running. I have an external C++ application that will auto login to a specific database and do a few things. The issue is, how can I query a process and get the environment variable settings? Only from the env variables can I find which database TcAE is currently connected to. I have it where if more then one imanserver.exe process is found, I inform the user and the application terminates. Only one session of TcAE can be running at a time, one imanserver.exe process. The next part, I need the env variables from the process so I can start a new command window and set the same env variables and launch my application to login the current connected database. Another option may be to launch a child process from the first imanserver.exe process? Is this possible and if so, would the child process inherit the parent environment variables? I know how to get the PID and the process HANDLE. This is only required to run on Windows. This must be done in a form of C++ (VC++, MFC), not C# or VB. Also, any links would help. I don't mind mining for information. Any help would be greatly appreciated. Thanks. |
|||
Recent GIDBlog
Problems with the Navy (Chiefs) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| win32 CreateProcess(), STARTUPINFO not working well for 98 console | Howard_L | C Programming Language | 0 | 10-Aug-2007 00:33 |
| Change 98 console character size in program? | Howard_L | C Programming Language | 1 | 25-Apr-2007 15:25 |
| how to keep the console window from opening | tajjyarden | C++ Forum | 1 | 06-Feb-2007 14:40 |
| need help with a console menu system | BullBuchanan | C++ Forum | 6 | 20-Aug-2006 15:46 |
| Bloodshed Dev C++ Project Options | JdS | C++ Forum | 6 | 11-Nov-2005 18:23 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The