[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to redirect stdout & stderr from a Windows app?
- Subject: Re: How to redirect stdout & stderr from a Windows app?
- From: Reimar Bauer <r.bauer(at)fz-juelich.de>
- Date: Wed, 24 Jan 2001 13:15:40 +0100
- Newsgroups: comp.lang.idl-pvwave
- Organization: Forschungszentrum Juelich GmbH
- References: <23JAN01.firstname.lastname@example.org>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:23147
Dave Greenwood wrote:
> I have a windows app (NT 4, IDL 5.3) that apparently screws up occasionally.
> That is, it doesn't respond to certain buttons, sliders, etc. Of course it
> hasn't failed any of the times I've tried it in the IDE. Is there any way
> to redirect stdout and stderr so I can capture IDL messages, PRINT output,
> etc. in a file? I've tried invoking runtime IDL from a DOS window with ">
> foo.bar" but I never get any output in foo.bar although my app starts. And,
> of course, I can't close or reopen units -1 or -2.
If you take a look at
"Diverting IDL Output" or "Initialization"
in the online help
Diverting IDL Output:
When using a tty-based interface (UNIX or VMS), IDL sends its output to
the screen for the user to see. When using a GUI based interface (any
platform), the output goes to the log window. The default output
function is automatically installed by IDL at startup. To divert IDL
output to a function of your own design, use IDL_ToutPush() and
IDL_ToutPop() to change the output function called by IDL.
Internally, IDL maintains a stack of output functions, and provides two
functions (IDL_ToutPush() and IDL_ToutPop()) to manage them. The most
recently pushed output function is called to output each line of text.
Output functions of your own design should have the following type
typedef void (* IDL_TOUT_OUTF)(int flags, char *buf, int n);
Who is able to share IDL_ToutPush() and IDL_ToutPop() functions?
Institut fuer Stratosphaerische Chemie (ICG-1)
a IDL library at ForschungsZentrum Jülich