Re: J.Nickerson: DosBox: path bug??

new topic     » topic index » view thread      » older message » newer message

Well, in other words, pCurrentDir is where you decide to launch your DOS
program, not where you initially run your program from . . .

For example, in my application, I use a variable to keep track of where the
application was run from so that it knows where my DOS program is, using
Euphoria's current_dir().  If I don't do this, then a user opening or saving
a file changes the "current working directory".

Here is the documentation from the API CreateProcess():

lpCurrentDirectory

Points to a null-terminated string that specifies the current drive and
directory for the child process. The string must be a full path and filename
that includes a drive letter. If this parameter is NULL, the new process is
created with the same current drive and directory as the calling process.
This option is provided primarily for shells that need to start an
application and specify its initial drive and working directory.

----- Original Message -----
From: "Grape Vine" <g__vine at hotmail.com>
To: "EUforum" <EUforum at topica.com>
Sent: Monday, June 11, 2001 9:32 AM
Subject: RE: J.Nickerson: DosBox: path bug??


>
>
> I assume pCurrentDir = acquire_mem(memset3, "C:\\" )
> is the current dir?
> Mine is
> pCurrentDir = acquire_mem(memset3, "C:\\tweaks\\blat\\" )
> but the active dir when pCommand runs is the current dir of dosbox2.exw
> (c:\euphoria\euapps\euemail\)
> not a big problem, just caused confusion because the dos box was hidden
> =) and could not see any errors. Just have to make sure everything is
> pointed instead of assuming current dir is the current dir
>
>
> 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 . . .
> >
> Grape Vine
> 13728824
>

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu