Solved

finding volume reference number & directory id

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Login Script to Copy Folders 12 29
repeatSeparator  java  challenge 13 56
no14 challenge 14 62
Updating statistics with error notification email in SQL server 4 73
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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.

920 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

17 Experts available now in Live!

Get 1:1 Help Now