Console Applications and Redirection

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Console Applications and Redirection

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:05 pm

by ssi >> Wed, 12 Dec 2001 22:41:42 GMT

I'm trying to work out how you can spawn a console app and have its output redirected into a jade program.

So far from what I've seen it seems to involve jade connection pipes maybe?

Anyone managed to do this?

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Console Applications and Redirection

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:05 pm

by MITCHELL1 >> Thu, 20 Dec 2001 0:19:16 GMT

Sam

If you have CardSchema then there is an undocumented entry point in the CardSchema released karma.dll which we use in the JADE Systems Management tool set to run external processes and capture standard output. The entry point is for an external method emCreateProcess which has the following signature:

emCreateProcess(
obj: Object;
cmdLine: String;
modal: Boolean;
notifyStdOut: Boolean;
childStdInText: String;
tag : Integer;
exitCode: Integer output): Integer is "emCreateProcess" in "karma" ;

To use this, we first start a secondary 'logger' thread that will receive standard output via notifications on the object specified in the 'obj' parameter with the tag value defined in the 'tag' parameter. The primary thread then performs the emCreateProcess call, passing in the required command line. If modal=true then the thread will hang at that point until the console process completes, at which time the exitCode of the process that you ran can be accessed.

Hope this helps

--
Richard W Mitchell
JADE Direct Technologies
mailto: rmitchell@jade.co.nz


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 28 guests