[net.micro.mac] OpenResFile behavior

lsr@apple.UUCP (08/22/86)

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