Communicating with a process?

BlitzMax Forums/BlitzMax Programming/Communicating with a process?

AntonyWells(Posted 2006) [#1]
Anyone know of a way to communicate with a running process if you spawned it yourself in code?

I mean the blitzide does it, it communicates debugger calls and gets messages back from blitz exes. How does it do this?
I'm about to take a look through the code but i'm not sure what to look for.


Yan(Posted 2006) [#2]
freeprocess.mod ??


AntonyWells(Posted 2006) [#3]
Just found that myself, but I'm not sure how to use it. Mainly because the process I'll be spawning is wrote in C++. So I need to be able to determine the process id in c++ to pass and recieve information from simon's mod.


Sweenie(Posted 2006) [#4]
One easy way to share information between two separate processes is to create a dll containing a shared section.
Any variables or arrays defined to be in that shared section will be shared by all processes using the dll.
Don't know how that works for Linux and Mac though.

Here is some info about it...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_how_do_i_share_data_in_my_dll_with_an_application_or_with_other_dlls.3f.asp


TartanTangerine (was Indiepath)(Posted 2006) [#5]
Our you could try windows messageing.


TeaVirus(Posted 2006) [#6]
If your process can communicate using StdIO this is a nice wrapper for freeproccess:
http://www.blitzmax.com/codearcs/codearcs.php?code=1558

I use this to control MPlayer in slave mode and it works great.