home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cbmvax!jesup
- From: jesup@cbmvax.commodore.com (Randell Jesup)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: How to program a DOS: handler?
- Message-ID: <35073@cbmvax.commodore.com>
- Date: 14 Sep 92 04:52:58 GMT
- References: <1992Sep13.200005.20531@spuddy.uucp>
- Reply-To: jesup@cbmvax.commodore.com (Randell Jesup)
- Organization: Commodore, West Chester, PA
- Lines: 34
-
- spark@spuddy.uucp (Steve) writes:
- >Specifically, what happens when someone opens my handler for the first time?
- >
- >copy * FRED:
- >blah blah
- >ctrl-\
- >
- >I take it, my code is LoadSeg()ed, CreateProc'ed. Then I get a
- >packet at my process port.
- >
- >Here's where I'm having a little difficulty. What is the 'open' packet
- >I get. I take it I then get ACTION_WRITEs, followed by ACTION_END?
-
- This is discussed in the packet docs in the 3rd Ed Bantam manual
- (though it does have some mistakes, notably in the ACTION_SET_DATE packet and
- one or two others). It certainly could use a full example, though there
- are working examples in C on the Fish disks.
-
- You'll get a startup packet (dp_Action = 0), with the string that
- caused you to be started, the startup value from the device node, and a
- pointer to the device node in dp_Arg1-3. After you return that with success,
- you'll get packets. Normally the first one will be an open or lock or some
- such - you should be ready for any. If you reject the first packet you
- will normally exit (if you're a non-filesystem handler). Otherwise you
- normally exit on the last Close(). Filesystems (that set dol_Task) normally
- never exit (one day they may have the ability, not now).
-
- --
- "Rev on the redline, you're on your own; seems like a lifetime, but soon it's
- gone..." Foreigner
- -
- Randell Jesup, Jack-of-quite-a-few-trades, Commodore Engineering.
- {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com BIX: rjesup
- Disclaimer: Nothing I say is anything other than my personal opinion.
-