Solved

finding volume reference number & directory id

Posted on 2000-04-09
2
195 Views
Last Modified: 2013-12-26
How can I find the  volume reference number & directory id of the folder that my application resides in at runtime?
0
Comment
Question by:dwp090598
2 Comments
 
LVL 2

Accepted Solution

by:
roov earned 100 total points
ID: 2699713
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
 

Author Comment

by:dwp090598
ID: 2702107
great, thank you.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now