Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!nike!ucbcad!ucbvax!decvax!decwrl!sun!idi!apple!lsr From: lsr@apple.UUCP Newsgroups: net.micro.mac Subject: OpenResFile behavior Message-ID: <143@apple.UUCP> Date: Thu, 21-Aug-86 19:26:44 EDT Article-I.D.: apple.143 Posted: Thu Aug 21 19:26:44 1986 Date-Received: Sat, 23-Aug-86 22:02:34 EDT Organization: Advanced Development Group, Apple Computer Lines: 21 Keywords: OpenResFile, bug Recently there was a message concerning funny behavior in OpenResFile. I lost the original message, but the answer is described in Tech Note #78. On the 64K ROM, there was a patch to OpenResFile that checks to see if the string being passed is the name of a printer, by inspecting the high bits of the pointer to the file name. If the high bits indicate a resource, then the patch will call RecoverHandle on the alleged handle, which will crash if the pointer is not to a resource.. The fix is to mask off the high-order byte of the address you pass to OpenResFile, to ensure that it is not flagged as a resource. -- Larry Rosenstein Object Specialist Apple Computer AppleLink: Rosenstein1 UUCP: {sun, voder, nsc, mtxinu, dual}!apple!lsr CSNET: lsr@Apple.CSNET