[comp.sys.mac.programmer] Mystery: where is HOpenResFile

exner@c20.trl.oz (Rolf Exner) (12/12/90)

A posting a couple of days back mentioned a function HOpenResFile that
allows one to specify the vRefNum and dirID of the resource file to be
opened. It was just what I was needed, but I couldn't find it documented
anywhere.

I ended up writing my own, only to get a Think C linker error telling me 
HOpenResFile is defined twice - once in my code and once in MacTraps!!

So, if this is a standard toolbox function, where is it documented, and in 
what version of the System did it become available?

han@Apple.COM (Byron Han) (12/13/90)

In article <2539@trlluna.trl.oz> exner@c20.trl.oz writes:
>A posting a couple of days back mentioned a function HOpenResFile that
>allows one to specify the vRefNum and dirID of the resource file to be
>opened. It was just what I was needed, but I couldn't find it documented
>anywhere.
>
Try Macintosh Technical Note #214.  hope this helps.

-- 
------------------------------------------------------------------------------
Byron Han, Software Artist           "1984 wasn't like 1984..."           
Apple Computer, Inc.                 -----------------------------------------
20525 Mariani Ave, MS: 35CP          Internet: han@apple.COM
Cupertino, CA 95014                  UUCP:{sun,voder,nsc,decwrl}!apple!han
ATTnet: 408-974-6450                 Applelink:HAN1   HAN1@applelink.apple.COM
------------------------------------------------------------------------------

daven@svc.portal.com (12/13/90)

In article <2539@trlluna.trl.oz> exner@c20.trl.oz writes:
>A posting a couple of days back mentioned a function HOpenResFile that
>allows one to specify the vRefNum and dirID of the resource file to be
>opened. It was just what I was needed, but I couldn't find it documented
>anywhere.
>
>I ended up writing my own, only to get a Think C linker error telling me 
>HOpenResFile is defined twice - once in my code and once in MacTraps!!
>
>So, if this is a standard toolbox function, where is it documented, and in 
>what version of the System did it become available?

I don't know of any HOpenResFile, but there is a HFS call named HOpenRF
which takes the parameters you mention.


-- 
-------------------------------------------------------------------------------
   Dave Newman              |  daven@svc.portal.com        |  AppleLink: D0025
   Sofware Ventures Corp.   |  AOL: MicroPhone             |  CIS: 76004,2161
   Berkeley, CA  94705      |  WELL: tinman@well.sf.ca.us  |  (415) 644-3232

Lawson.English@p88.f15.n300.z1.fidonet.org (Lawson English) (12/16/90)

Rolf Exner writes in a message to All

RE> So, if this [HOpenResFile] is a standard toolbox function, where is 
RE> it  documented, 
RE> and in what version of the System did it become available?

PBHOpenRF(...):OSErr; 

is documented in IM vol 4, page 137: "PBHOpenRF is identical to PB OepnRF 
except
that it accepts a directory ID in ioDirID."

I don't know where the "ResFile" part comes from...


Lawson
 

 

--  
Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!300!15.88!Lawson.English
Internet: Lawson.English@p88.f15.n300.z1.fidonet.org

6500rgls@ucsbuxa.ucsb.edu (Randall S Geels) (12/17/90)

See Apple Tech. Note #214 dated Oct. 1, 1988.
Here it explains that HOpenResFile is actually just some glue code
which makes opening a resource file easier.
(PS. Tech. Notes are available from apple.com via anonymous ftp)

--Randy