Solved

finding volume reference number & directory id

Posted on 2000-04-09
2
201 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
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.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

729 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