lotus



previous page: 4.3) Why do you say wdRefNum sometimes and vRefNum sometimes? Why do you say parID sometimes and dirID sometimes? (Files - Mac Programming)
  
page up: Mac Programming FAQ
  
next page: 4.5) How do I select a folder using SFGetFile? (Files - Mac Programming)

4.4) How do I convert a wdRefNum as returned by SFGetFile into a vRefNum/parID pair to use with the HXxx calls? (Files - Mac Programming)




Description

This article is from the Mac Programming FAQ, by Jon Watte h+@austin.metrowerks.com with numerous contributions by others.

4.4) How do I convert a wdRefNum as returned by SFGetFile into a vRefNum/parID pair to use with the HXxx calls? (Files - Mac Programming)

Use GetWDInfo, which is declared as:

Pascal OSErr GetWDInfo ( short wdRefNum , short * vRefNum , long * parID
, OSType * procID ) ;

The procID parameter must be non-NULL and point to an OSType variable,
but the value of that variable can and should be ignored.

It is recommended that, as soon as you get your hands on a wdRefNum, for
instance from SFGetFile, you directly convert it into a vRefNum/parID
pair and always use the latter to reference the folder.

 

Continue to:















TOP
previous page: 4.3) Why do you say wdRefNum sometimes and vRefNum sometimes? Why do you say parID sometimes and dirID sometimes? (Files - Mac Programming)
  
page up: Mac Programming FAQ
  
next page: 4.5) How do I select a folder using SFGetFile? (Files - Mac Programming)