Bob,
You can also use CreateFile, WriteFile to write to Stdout.
You can specify the CONIN$ value in a call to the CreateFile function to get a handle to a console's input buffer. Similarly, you can specify the CONOUT$ value to get a handle to a console's active screen buffer. Once you have the handle you can use WriteFile/Readfile to read and write to StdIn and Stdout.
FWIW, if you're doing this for running CGI executables I wouldn't recommend
that! It's very slow and resource intensive for the VFP runtime to start up
and stop on each hit. It's much more efficient to have a small stub handler
written in C to talk to a running VFP instance than having VFP fired
on each hit.
+++ Rick ---