To: "A.Appleyard" Cc: DJGPP AT sun DOT soe DOT clarkson DOT edu Subject: Re: Calling an overlay in Gnu C/C++ Date: Mon, 06 Feb 95 18:45:09 +0200 From: "Eli Zaretskii" > the run. I suppose that these needed-once-only bits of program could be called > as child processes; I know how to make Gnu C program X.CC call Gnu C program > Y.CC; but how can Y.CC write to an array declared within X.CC? How about calling these programs with popen() instead of spawnXXX()? If you can arrange for these one-timers to write their output to standard output, you can then popen("xyzzy.exe", "r") in the main program and read into your array whatever comes from the stream which popen() returns. If you care about portability, this is the way to go. Alternatively, you could allocate a buffer in low memory by calling _go32_dpmi_allocate_dos_memory() in the main program, then pass the address of the buffer to the child process (via command line). The child can then put its output there with a call to movedata() or dosmemput().