[comp.sys.mac.programmer] Isn't there an OpenResFile where you supply a VRefNum?

vrm@blackwater.cerc.wvu.wvnet.edu (Vasile R. Montan) (04/30/91)

The usual OpenResFile takes a string as its arguement.  This
string is the filename of the resource file to be opened.

Isn't there a newer function which does the same thing, but
which also takes a volume reference number so that the
location of the file can be specified?  I seem to remember
reading about such a procedure somewhere, but I can't find
the documentation now when I look.

If there is such a procedure, when was it introduced?  With
the MacPlus ROM?

Thank you!
--Kurisuto
un020070@vaxa.wvnet.edu

resnick@cogsci.uiuc.edu (Pete Resnick) (04/30/91)

vrm@blackwater.cerc.wvu.wvnet.edu (Vasile R. Montan) writes:

>The usual OpenResFile takes a string as its arguement.  This
>string is the filename of the resource file to be opened.

>Isn't there a newer function which does the same thing, but
>which also takes a volume reference number so that the
>location of the file can be specified?  I seem to remember
>reading about such a procedure somewhere, but I can't find
>the documentation now when I look.

Inside Macintosh IV, p. 17:

FUNCTION OpenRFPerm (fileName: Str255; vRefNum: INTEGER;
           permission: Byte) : INTEGER;

>If there is such a procedure, when was it introduced?  With
>the MacPlus ROM?

Yup.

pr
--
Pete Resnick             (...so what is a mojo, and why would one be rising?)
Graduate assistant - Philosophy Department, Gregory Hall, UIUC
System manager - Cognitive Science Group, Beckman Institute, UIUC
Internet/ARPAnet/EDUnet  : resnick@cogsci.uiuc.edu
BITNET (if no other way) : FREE0285@UIUCVMD

nerm@Apple.COM (Dean Yu) (05/01/91)

In article <1991Apr30.092548.26555@ux1.cso.uiuc.edu> resnick@cogsci.uiuc.edu (Pete Resnick) writes:
>vrm@blackwater.cerc.wvu.wvnet.edu (Vasile R. Montan) writes:
>
>>The usual OpenResFile takes a string as its arguement.  This
>>string is the filename of the resource file to be opened.
>
>>Isn't there a newer function which does the same thing, but
>>which also takes a volume reference number so that the
>>location of the file can be specified?  I seem to remember
>>reading about such a procedure somewhere, but I can't find
>>the documentation now when I look.
>
>Inside Macintosh IV, p. 17:
>
>FUNCTION OpenRFPerm (fileName: Str255; vRefNum: INTEGER;
>           permission: Byte) : INTEGER;
>

In System 7, there's also:

FUNCTION HOpenResFile(vRefNum: INTEGER;dirID: LONGINT;fileName: Str255;
    permission: SignedByte): INTEGER;
PROCEDURE HCreateResFile(vRefNum: INTEGER;dirID: LONGINT;fileName: Str255);

>>If there is such a procedure, when was it introduced?  With
>>the MacPlus ROM?
>

  I think these two were introduced in 6.0.x, or maybe just as glue in MPW.

  -- Dean Yu
     Blue Meanie, Negative Ethnic Role Model, etc.
     Apple Computer, Inc.
     My opinions and so on and so forth...

lsr@Apple.com (Larry Rosenstein) (05/01/91)

In article <52201@apple.Apple.COM>, nerm@Apple.COM (Dean Yu) writes:
> 
>
In System 7, there's also:
> 
> FUNCTION HOpenResFile(vRefNum:
INTEGER;dirID: LONGINT;fileName: Str255;
>     permission: SignedByte):
INTEGER;
> PROCEDURE HCreateResFile(vRefNum: INTEGER;dirID:
LONGINT;fileName: Str255);

I think these are glue in MPW.  (See Tech Note
#214.)

But System 7 does have FSpOpenResFile and FSpCreateResFile that
take FSSpecs. 

Larry