|
Have you looked at _popen and _pclose? Just add #define popen _popen #define pclose _pclose and you should be fine. I have the source code. The worse is that I had written a full email with source code to use Win32 pipes when I saw the _popen function... anyway. M-A -----Original Message----- From: Scott Klement [mailto:klemscot@xxxxxxxxxxxx] Sent: 18 juillet, 2003 18:23 To: Linux 5250 Development Project Subject: RE: [LINUX5250] Windows compiling On Fri, 18 Jul 2003, Marc-Antoine Ruel wrote: > Sorry for my uncomprehension, but what do you exactly mean by piping? > In the Unix version, you can specify something like this: outputcommand=scs2ascii|enscript --output -|ps2pdf - -|lpr -Ppdf In the code, there's a popen() call (open pipe) which accepts that string as an argument. Anything written to the FILE * that popen() returns will be piped to the stdin or the scs2ascii command. Likewise, the stdout from scs2ascii is piped to stdin of enscript, etc, etc. > If you means redirecting win32 text output to a deamon (another process > and/or another computer), use a named pipe. It's quite simple to use. > GetStdHandle/SetStdHandle does the job if you want to redirect text > output. In C, we need to update a cached value (_stdout) but it's > simple. Look for "Named Pipes" in MSDN Well.. I sort of want to go to another process... really what I want is the operating system to start up a process with the command line that I've given, and send all of my output to that process's stdin, and then likewise for the next program up the chain. But, I'll take a look at that... > > It's always simpler to write than to code :) > Not in Unix... this is much simpler than my explanation was: p = popen(outputcommand, "w"); while (!tn5250_record_is_chain_end(This->rec)) fprintf(p, "%c", tn5250_record_get_byte(This->rec)); pclose(p);
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.