home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / vp21beta.zip / OEXMPSRC.RAR / OS2EXEC / OS2EXEC.TXT < prev    next >
Text File  |  2000-08-15  |  2KB  |  63 lines

  1.  
  2.   Virtual Pascal for OS/2 v1.00
  3.   (C) 1996 fPrint UK Ltd
  4.   London, 7 April 1996
  5.  
  6.  
  7.   The Os2Exec unit
  8.   ~~~~~~~~~~~~~~~~
  9.   The Os2Exec unit implements a VP/2 class, TRedirExec, which allows your
  10.   programs to capture the output of a child process which outputs text to
  11.   standard output.
  12.  
  13.   To demonstrate the use of the class, an example program TRedirExec has
  14.   been included.  It creates a TRedirExec instance, and executes a DIR
  15.   command (through the CMD.EXE command processor) 5 times, and displays
  16.   the output in a window on the screen by using the Window procedure of
  17.   the Crt window.
  18.  
  19.  
  20.   TRedirExec
  21.   ~~~~~~~~~~
  22.   The TRedirExec class implements the following published fields, which
  23.   can be used by application programs.
  24.  
  25.   constructor create        Must be called to create instance
  26.   destructor Destroy        Must be called to free instance
  27.  
  28.   function Execute          Is called to execute a child process.
  29.                             Returns True, if the process was executed
  30.                             succesfully, and False otherwise.
  31.  
  32.   property Terminated       Returns True, if the executing process has
  33.                             terminated and no further lines of output
  34.                             are available.
  35.  
  36.   property MessageReady     Returns True, if a line of output from the
  37.                             child process is ready.
  38.  
  39.   property ReturnCode       When Terminated returns True, this property
  40.                             contains the return code of the process.
  41.  
  42.   property Message          Returns any available output string from the
  43.                             child process, or a blank line if no message
  44.                             is ready.
  45.  
  46.   property OnTerminate      This method is called when the process terminates
  47.  
  48.   property OnCharReady      This method is called every time a character is
  49.                             received from the child process.  Can be used to
  50.                             perform any pre-processing required.
  51.  
  52.   property OnLineReady      This method is called every time a line is
  53.                             received.
  54.  
  55.   Do note, that the methods are called only when the main program checks
  56.   the state of MessageReady or Message.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.