• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 205
  • Last Modified:

finding volume reference number & directory id

How can I find the  volume reference number & directory id of the folder that my application resides in at runtime?
0
dwp090598
Asked:
dwp090598
1 Solution
 
roovCommented:
You can use the process manager to get the FSSpec of your application:

This is the basic code:
ProcessSerialNumber psn;
ProcessInfoRec psiRec;
FSSpec spec;
OSErr err = GetFrontProcess(&psn);
psiRec.processName = nil;
psiRec.processAppSpec = &spec;
psiRec.processInfoLength = sizeof(psiRec);
err = GetProcessInformation(&psn, &psiRec);
// spec now has the location of the app...

Enjoy,
Reuven
0
 
dwp090598Author Commented:
great, thank you.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now