home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / amiga / programm / 13331 < prev    next >
Encoding:
Internet Message Format  |  1992-09-13  |  1.9 KB

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