Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!think.com!snorkelwacker!ira.uka.de!smurf!urlichs From: urlichs@smurf.sub.org (Matthias Urlichs) Newsgroups: comp.sys.mac.programmer Subject: Re: DrvrInstall and DrvrRemove Message-ID: Date: 13 Nov 90 07:25:13 GMT References: <1990Nov12.062133.29315@ux1.cso.uiuc.edu> Organization: University of Karlsruhe, FRG Lines: 35 In comp.sys.mac.programmer, article <1990Nov12.062133.29315@ux1.cso.uiuc.edu>, resnick@cogsci.uiuc.edu (Pete Resnick) writes: < I was reading a draft tech note written by Mark Bennett that talked < about installing drivers at INIT time. I have a couple of questions < concerning the procedure and my particular project: < < 3. Can I do this at other than INIT time? < No problem. Just make sure that your driver and your DCE end up in the heap you want them to be in. < 4. If I want to close the driver and get rid of it, I assume I call < CloseDriver and then DrvrRemove. Is that right or do I only need to < call CloseDriver (or PBClose)? If I need to call DrvrRemove, TN 108 < says that it calls ReleaseResource. If I have done a DetachResource, < that won't work very well. Can this be right? < Yes -- there are flags in the DCE which tell DrvrRemove what to do. "IL DrvrRemove+0E" (A2 contains the unit table entry; hand-disassembled): MOVE.L (A2),A1 BTST #5,5(A1) BNE.S Error BTST #6,5(A1) BEQ.S noRes MOVE.L (A1),-(A7) _ReleaseResource noRes MOVE.L A2,A0 _DisposHandle ... Error MOVEQ #$E7,D0 BRA Out -- Matthias Urlichs -- urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de /(o\ Humboldtstrasse 7 - 7500 Karlsruhe 1 - FRG -- +49+721+621127(0700-2330) \o)/