[comp.sys.mac.programmer] Getting Application's path

u2zj@vax5.cit.cornell.edu (03/16/91)

I'm writing a CODE resource that is called by an application.
My CODE has to open an existing resource file in the same folder
as the calling application.  I know the name of the resource file
(eg "MyFile") but (I think) I need to append this to the full path
(eg "Disk:Excel 3.0:") when I call OpenResFile().

Can someone tell me how to get the path name of the calling application's
folder?  Or is there some other way?

Thanks,
Stanton Loh
u2zj@vax5.cit.cornell.edu

2fmlcalls@kuhub.cc.ukans.edu (03/16/91)

In article <1991Mar15.200429.3417@vax5.cit.cornell.edu>, u2zj@vax5.cit.cornell.edu writes:
> I'm writing a CODE resource that is called by an application.
> My CODE has to open an existing resource file in the same folder
> as the calling application.  I know the name of the resource file
> (eg "MyFile") but (I think) I need to append this to the full path
> (eg "Disk:Excel 3.0:") when I call OpenResFile().
> 
> Can someone tell me how to get the path name of the calling application's
> folder?  Or is there some other way?
> 
> Thanks,
> Stanton Loh
> u2zj@vax5.cit.cornell.edu

I'm a bit confused.  Is the CODE resource, resource file, and the app ALL in
the same folder?  If so, just OpenResFile() will do.  I'm working on a game
where I do basically just that.  If the resource file is in the same folder as
the program calling it up, it will be found by OpenResFile().

john calhoun