Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FiveWin 1.9.2 - January 97 - waitrun() executes another windows application and waits http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 WaitRun()              Executes another Windows application and waits
--------------------------------------------------------------------------------

   Syntax:              WaitRun( <nCmdLine>, <nCmdShow> )
                                --> <hInstance>

   Parameters:

   <nCmdLine>           A string that contains the command line
                        to execute. If it does not contains a path,
                        then Windows searches in this order:

                        1       The current directory.

                        2       The Windows directory (the directory
                                containing WIN.COM); the GetWinDir()
                                function retrieves the path of this directory.

                        3       The Windows system directory (the directory
                                containing such system files as GDI.EXE); the
                                GetSysDir() function retrieves the path of
                                this directory.

                        4       The directory containing the executable file
                                for the current task; the GetModuleFileName
                                function retrieves the path of this directory.

                        5       The directories listed in the PATH environment
                                variable.

                        6       The directories mapped in a network.

   <nCmdShow>           Specifies how the windows application has to be
                        shown. See ShowWindow() for a description of all
                        possible values.

   Returns:

   <hInstance>          The return value identifies the instance of the
                        loaded module, if the function is successful.
                        Otherwise, the return value is an error value less
                        than 32:

                        0       System was out of memory, executable file was
                                corrupt, or relocations were invalid.

                        2       File was not found.

                        3       Path was not found.

                        5       Attempt was made to dynamically link to a
                                task, or there was a sharing or
                                network-protection error.

                        6       Library required separate data segments for
                                each task.

                        8       There was insufficient memory to start the
                                application.

                       10       Windows version was incorrect.

                       11       Executable file was invalid. Either it was
                                not a Windows application or there was an
                                error in the .EXE image.

                       12       Application was designed for a different
                                operating system.

                       13       Application was designed for MS-DOS 4.0.

                       14       Type of executable file was unknown.

                       15       Attempt was made to load a real-mode
                                application (developed for an earlier version
                                of Windows).

                       16       Attempt was made to load a second instance
                                of an executable file containing multiple
                                data segments that were not marked read-only.

                       19       Attempt was made to load a compressed
                                executable file. The file must be decompressed
                                before it can be loaded.

                       20       Dynamic-link library (DLL) file was invalid.
                                One of the DLLs required to run this
                                application was corrupt.

                       21       Application requires 32-bit extensions.


   Observations:       This function works exactly as WinExec() with
                       the difference that it waits for the new task issued
                       to finish.

   Sample:             SAMPLES\\FwBrow.prg

   Source code:        SOURCE\\WINAPI\\WinExec.c

   See also:           ShowWindow() WinExec()


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson