Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating FSRef from vrn, dirID, and name




On Mar 13, 2007, at 1:58 PM, Steve Mills wrote:

You can simplify the above a little with the following:

	FSRefParam		parm = { 0 };
	OSErr			err;
	FSRef			parent;
	
	parm.ioVRefNum = vrn;
	parm.ioDirID = dirID;
	parm.newRef = &parent;
	err = PBMakeFSRefSync(&parm);

Are you positive that PBMakeFSRefSync can handle the ioNamePtr of nil? The docs don't mention allowing nil, so I err on the safe side and pass an empty string.

From the File Manager PDF on Apple's web site:

ioNamePtr
A pointer to a pathname. Whenever a function description specifies that ioNamePtr is
used—whether for input, output, or both—you should set this field to point to storage for a
Str255 value (if you’re using a pathname) or to NULL (if you’re not).


Or the online version:

http://gemma.apple.com/documentation/Carbon/Reference/File_Manager/ Reference/reference.html#//apple_ref/c/tdef/FSRefParam

Which docs where you reading that didn't mention it?

Larry _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Creating FSRef from vrn, dirID, and name (From: "Steve Mills" <email@hidden>)
 >Re: Creating FSRef from vrn, dirID, and name (From: "Steve Mills" <email@hidden>)
 >Re: Creating FSRef from vrn, dirID, and name (From: Laurence Harris <email@hidden>)
 >Re: Creating FSRef from vrn, dirID, and name (From: "Steve Mills" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.