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