home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / CALLBOX.ZIP / README.DOC < prev   
Text File  |  1989-10-22  |  2KB  |  51 lines

  1.  
  2. "It's a HACK".
  3.  
  4. This is a nasty set of os/2 programs that,  to my surprise
  5. <chagrin>, works.
  6.  
  7. BOXMON is run in the Dos Box.  It keeps on trying to open a named
  8. pipe.  Once opened,  it grabs whatever is in there and calls
  9. system() with it.
  10.  
  11. CALLBOX is run from an os/2 1.10 command prompt (full screen or
  12. VIO). It installs a keyboard monitor that stuffs the following key
  13. sequence into KBD$: CTRL-ESC, HOME, ENTER.  This brings up the Task
  14. Manager (ctrl-esc), moves to the first "running program" (home),
  15. which is the "Dos command prompt", and switches to it <enter>.  As
  16. DOS comes to life,  CALLBOX creates the named pipe that BOXMON is
  17. looking for, and writes the command to it. CALLBOX then waits for
  18. BOXMON to send it a "Ok, I'm done" command before exiting. BOXMON
  19. then goes back into a wait state, waiting for the next command from
  20. CALLBOX.
  21.  
  22. It doesn't matter which program you start first.
  23.  
  24. Let's say you just booted your system. (I assume that your
  25. config.sys says PROTECTONLY=NO). Your autoexec.bat it set up so that
  26. at some point calls BOXMON.EXE.  At any time during an os/2 session
  27. (perhaps in startup.cmd),  you can call "CALLBOX <dos arguments>" do
  28. activate the DOS BOX.  Since this is the first time the dos box has
  29. been accessed, autoexec.bat will be run. As soon as BOXMON is
  30. invoked, whamo -- <dos arguments> will be run. When the dos command
  31. is done, the os/2 session that called the dos box will come back to
  32. the foreground.  BOXMON will be waiting for the next command. (If
  33. the command IS 'command', command.com will be loaded. When you type
  34. EXIT, you will go back to the os/2 session.  Now THIS is what you
  35. call a dos shell!)
  36.  
  37. Only one os/2 session at a time can call CALLBOX. If you try to do
  38. this, the second CALLBOX will give an error "Couldn't make
  39. \PIPE\DOSTALK, error 00e7", and fail (with errorlevel > 1).
  40.  
  41. The concept for using a keyboard monitor to bring up the Task Manger
  42. was taken from some sample code posted on Microsoft ONLINE.
  43.  
  44. I actually have no use for this program -- someone else baited me
  45. with "can it be done".  Let me know what you do with it.
  46.  
  47. Peter Fitzsimmons.
  48. Usenet: pete@gompa
  49. FidoNet: 1:250/628
  50. BBS: (416)867-9663.
  51.