PBDTGetPath
You can get the reference number of the desktop database using thePBDTGetPathfunction.
FUNCTION PBDTGetPath (paramBlock: DTPBPtr): OSErr;
paramBlock- A pointer to a desktop parameter block.
 ioResult OSErr The result code of the function. --> ioNamePtr StringPtr A pointer to the volume name or full pathname of the desktop database. --> ioVRefNum Integer The volume reference number of the desktop database.  ioDTRefNum Integer The desktop database reference number. DESCRIPTION
ThePBDTGetPathfunction returns the desktop database reference number in theioDTRefNumfield, which represents the access path to the database. You specify the volume by passing a pointer to its name in theioNamePtrfield or a volume reference number in theioVRefNumfield. If the desktop database is not already open,PBDTGetPathopens it and then returns the reference number. If the desktop database doesn't exist,PBDTGetPathcreates it. IfPBDTGetPathfails, it sets theioDTRefNumfield to 0.
- Note
- You cannot use the desktop reference number as a file reference number in any File Manager routines.
![]()
- WARNING
- Do not call
PBDTGetPathat interrupt time--it allocates memory in the system heap.![]()
RESULT CODES
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help