- Inside Macintosh: More Macintosh Toolbox /
- Chapter 9 - Desktop Manager / Desktop Manager Reference
- Routines / Locating, Opening, and Closing the Desktop Database
PBDTGetPath
You can get the reference number of the desktop database using the PBDTGetPath function.
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
The PBDTGetPath function returns the desktop database reference number in the ioDTRefNum field, which represents the access path to the database. You specify the volume by passing a pointer to its name in the ioNamePtr field or a volume reference number in the ioVRefNum field. If the desktop database is not already open, PBDTGetPath opens it and then returns the reference number. If the desktop database doesn't exist, PBDTGetPath creates it. If PBDTGetPath fails, it sets the ioDTRefNum field to 0.
- Note
- You cannot use the desktop reference number as a file reference number in any File Manager routines.
- WARNING
- Do not call
PBDTGetPath at interrupt time--it allocates memory in the system heap.
RESULT CODES
| noErr | 0 | No error |
| ioErr | -36 | I/O error |
| extFSErr | -58 | External file system--file system identifier is nonzero |
| desktopDamagedErr | -1305 | The desktop database has become corrupted--the Finder will fix this, but if your application is not running with the Finder, use PBDTReset or PBDTDelete |
© Apple Computer, Inc.
6 JUL 1996