RE: J.Nickerson: DosBox
MAny Many thanx
jjnick at cvn.com wrote:
> Just need to add the following lines after acquiring memory for the
> startup info structure . . .
>
> store(ptStartup, dwFlags, STARTF_USESHOWWINDOW)
> store(ptStartup, wShowWindow, SW_HIDE)
>
> Don't forget to define STARTF_USESHOWWINDOW . . .
>
> Here is the rest of the code:
>
> -- This routine will call a DOS console, suspend euphoria window (code),
> -- then revert back to the window once the DOS console is done.
> --
> -- Of course, euphoria's system() does the same thing, but does not
> -- work in Windows 2000: the euphoria program continues running even
> -- if the DOS console is still running. Calling system_exec() works
> -- under 2000 but the console is not released when finished.
> --
> -- Please Note: the "/c" switch in the call to "command.com" will exit
> -- the DOS console when finished.
> --
> -- Have to use the API CreateProcess() because it is the only function
> -- that works with WaitForSingleObject(), given the context of the
> -- requirement outlined above.
> --
> -- Jason Nickerson
>
> include win32lib.ew
> without warning
>
> global constant TRUE = 1,
> FALSE = 0,
> NORMAL_PRIORITY_CLASS = 32,
> INFINITE = -1,
> STARTF_USESHOWWINDOW = 1
>
>
> global constant
> cb = allot( DWord ),
> lpReserved = allot( Ptr ),
> lpDesktop = allot( Ptr ),
> lpTitle = allot( Ptr ),
> dwX = allot( DWord ),
> dwY = allot( DWord ),
> dwXSize = allot( DWord ),
> dwYSize = allot( DWord ),
> dwXCountChars = allot( DWord ),
> dwYCountChars = allot( DWord ),
> dwFillAttribute = allot( DWord ),
> dwFlags = allot( DWord ),
> wShowWindow = allot( Word ),
> cbReserved2 = allot( Word ),
> lpReserved2 = allot( Ptr ),
> hStdInput = allot( Hndl ),
> hStdOutput = allot( Hndl ),
> hStdError = allot( Hndl ),
> SIZEOF_STARTUPINFO = allotted_size()
>
> global constant
> hProcess = allot( Hndl ),
<snip>
Grape Vine
13728824
|
Not Categorized, Please Help
|
|