home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
DOSCMD.ZIP
/
DOSCMD.DOC
< prev
next >
Wrap
Text File
|
1991-07-09
|
781b
|
17 lines
This program demonstrates how to issue commands to the DOS session from an
OS/2 V1.2 or V1.3 fullscreen or windowed session. It passes the command line
parameters to the DOS session. The steps it takes are:
Get a file handle (via DosOpen) to the DOS.SYS device driver.
Find the session number of the DOS box by looking through the task list.
Build the string to pass to the DOS box by putting spaces around each
command line parameter and separating them with carriage returns.
Write the string to the handle received from the DosOpen.
Make the DOS box the foreground, so it resumes running and can execute the
command(s).
Print a message telling how it went.
There is a bit of error handling going on, but that is basically it.
Dennis Rowe 75140,3710