* :--------------------------------------- * ------------------------: Copybook for WinExec. * : * : See the documentation for details. * :--------------------------------------- * * Note: WinExec launches programs asynchronously; that is, * control returns immediately to your application without * waiting for the launched program to finish. If your * application needs to wait until it finishes, use the * CMDSHOW values with WAIT in the name. * ---------------------------------------------------------------- * * To use: * * COPY WIN32API. * COPY WINEXEC. * . * . * ------------------------: Load the command line; * * STRING 'myapp.EXE' * LOW-VALUE DELIMITED SIZE INTO WINEXEC-COMMAND-LINE. * * ------------------------: Call the API to launch the program. * * SET API-WINEXEC TO TRUE. * CALL 'GSWINAPI' USING WIN32API-PARMS * WINEXEC-COMMAND-LINE * WINEXEC-CMDSHOW * WIN32API-C * WIN32API-D * WIN32API-E * WIN32API-F. * * ---------------------------------------------------------------- * * Calling Parameters...: Command line to be invoked. * : Note: Must be LOW-VALUE terminated! * 01 WINEXEC-COMMAND-LINE PIC X(1024). * : Show state of the new application. 01 WINEXEC-CMDSHOW PIC S9(9) COMP-5 VALUE 1. 88 SW-HIDE VALUE ZERO. 88 SW-SHOWNORMAL VALUE 1. 88 SW-SHOWMINIMIZED VALUE 2. 88 SW-SHOWMAXIMIZED VALUE 3. 88 SW-SHOWNOACTIVATE VALUE 4. 88 SW-SHOWMINNOACTIVE VALUE 7. * : This set of show-commands will force * : GUI ScreenIO to wait for the launched * : task to terminate before proceeding. * : Since the screen and your program * : will be frozen (and unable to repaint * : itself) you may find it preferable * : to DO-MINIMIZED for the duration. * : Note that the current implimentation 080216ja * : offers no real control over the window080216ja * : of the launched task when using wait. 080216ja 88 SW-HIDE-WAIT VALUE -99. 88 SW-SHOWNORMAL-WAIT VALUE -1. 88 SW-SHOWMINIMIZED-WAIT VALUE -2. 88 SW-SHOWMAXIMIZED-WAIT VALUE -3. 88 SW-SHOWNOACTIVATE-WAIT VALUE -4. 88 SW-SHOWMINNOACTIVE-WAIT VALUE -7.