Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!lll-lcc!pyramid!hplabs!well!dwb From: dwb@well.UUCP (David W. Berry) Newsgroups: net.micro.mac Subject: Re: Closing DAs (and TML questions) Message-ID: <1706@well.UUCP> Date: Tue, 2-Sep-86 07:30:29 EDT Article-I.D.: well.1706 Posted: Tue Sep 2 07:30:29 1986 Date-Received: Tue, 2-Sep-86 21:11:13 EDT References: <1693@well.UUCP> <130@suvax1.UUCP> Reply-To: dwb@well.UUCP (David W. Berry) Organization: Whole Earth Lectronic Link, Sausalito CA Lines: 32 The Device Manager section of IM defines three things of importance to the GoodBye kiss feature: dCtlFlags - a word at offset 4 in the device control entry drvrFlags - a word at offset 0 in the driver header dNeedGoodBye - bit number 4 for usage in bit munger calls or 16 for direct operations. In order to receive a good bye kiss when an application goes away set the dNeedGoodBye bit in dCtlFlags. THis can be done at run time with: dce->dCtlFlags |= dNeedGoodBye or BitSet(@dce^.dCtlFlags, LONGINT(dNeedGoodBye)) or by setting it in the header, however you happened to get that defined. Having done so your Control routine will be called with csCode equal to -1 when the application heap is about to be reinitialized, which happens mainly when an application is Launched. Exiting an application is really Launching the Finder so it works as expected. I will now refrain from the usual exhortation to buy a copy of Inside Macintosh if you plan on doing any programming of the mac. If the pascal function call is incorrect please forgive me as it has been quite a few years since I gave it up. -- David W. Berry dwb@well.uucp dwb@Delphi dwb@GEnie 293-0752@408.MaBell