Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rutgers!cbmvax!uunet!mcsun!unido!mpirbn!p554mve From: p554mve@mpirbn.UUCP (Michael van Elst) Newsgroups: comp.sys.amiga.tech Subject: Re: SetFunction and expunging libraries Message-ID: <551@mpirbn.UUCP> Date: 10 Feb 90 16:14:17 GMT References: Reply-To: p554mve@mpirbn.UUCP (Michael van Elst) Distribution: comp Organization: Max-Planck-Institut fuer Radioastronomie, Bonn Lines: 21 In article deven@rpi.edu (Deven T. Corzine) writes: >Just curious... what exactly happens when you SetFunction a library >call and the library is later expunged? Is it possible to be notified >to remove the patch? (or would you have to patch the Expunge() call >of the library to do so?) Or must you make sure you keep the library >open for the duration of the SetFunction? Exactly what you think. If you patch a library you MUST hold it in memory as long as your patch should work. In a library this is easily done with opening the library. A device (that's a special library) may refuse to open from more programs at the same time, there you have to patch the Expunge vector too. Carolyn Sheppners program CMD (source on some fishdisk) shows this method. It patches the devices Expunge and BeginIO vectors to catch all CMD_WRITES to the parallel or serial device. It even checks if another patch program has done a second SetFunction on these vectors because this program might call CMD's patches in a daisy chain. Michael van Elst uunet!unido!mpirbn!p554mve