Solved

finding volume reference number & directory id

Posted on 2000-04-09
2
198 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
function returning CString in a regular win32 DLL 8 189
repeatEnd java challenge 42 85
Named range not carried over 10 65
Unix Command -- Challenging  question 7 96
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 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