home *** CD-ROM | disk | FTP | other *** search
- Path: cpca3.uea.ac.uk!news
- From: Dan J Archer <D.Archer@uea.ac.uk>
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: WBStartup - Help!
- Date: Wed, 17 Jan 1996 17:26:08 -0800
- Organization: EBP
- Message-ID: <30FDA1B0.5030@uea.ac.uk>
- References: <vreeland-1601961903260001@192.0.2.1>
- NNTP-Posting-Host: nc6h.nca.uea.ac.uk
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b5 (Win95; I; 16bit)
-
- Robert W. Vreeland Jr. wrote:
- ...
- >
- > I've written some code to simulate launching a process as if it were
- > launched by the workbench. The code works flawlessly, with one single
- > problem. The new process never ends up with correct command paths setup....
- > Now does any one know: how does a task spawned by the workbench get a
- > command path...where does it come from and how to I get my code to set
- > this up correctly. It does not (contrary to what I saw someone post) get
- > sent by the WBStartup message. This message contains the name of the new
- > process and lock on its directory as well as the names of any arguments
- > and locks on their directories. So what gives?
- >
- > Thanks in advance,
- > Robert.
-
- Hmmm, it's a tricky one...I can be only of minor assistance.
-
- CLI processes have the pr_CLI pointer pointing to a CommandLineInterface structure, and within
- this heinous artifice is a cli_CommandDir pointer. This is a BPTR to a single linked list with
- the following structure (not defined in CBM's header files)
-
- struct PathList /* size = 8 */
- {
- BPTR nextPath; /* BPTR to struct PathList */
- BPTR pathLock; /* BPTR to struct FileLock */
- };
-
- nextPath links the elements of the list together, and pathLock is a pointer to the FileLock
- structure of the dir this path entry refers to.
-
- Now, if it was a CLI process you were "faking", you would be home and dry. I have no idea where
- WB processes get their pathList from: presumably they inherit it from Workbench, as WB is started
- from the CLI and will thus have a ptr to a CommandLineInterface set. Is your simulator program a
- CLI process? Maybe you need to copy WB's pr_CLI pointer to your simulator's process structure...?
-
- Athankye.
-
- /----------------------------------------------------------------------\
- / "A friend of mine did ride astride with tattered hat and stalk of hay: \
- \ He carried buckets of giraffe, and hairless errors 'pon a tray." /
- \----------------------------------------------------------------------/
- / D.Archer@uea.ac.uk | http://www.uea.ac.uk/~u9537872/ \
- \----------------------------------------------------------------------/
- \ Opinions expressed are not those of UEA, or anyone with lawyers. /
- \------------------------------------------------------------------/
-