Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: More Macintosh Toolbox /
Chapter 9 - Desktop Manager / Desktop Manager Reference
Routines / Reading the Desktop Database


PBDTGetAPPL

To identify the application that can open a file with a given creator, use the PBDTGetAPPL function.

FUNCTION PBDTGetAPPL (paramBlock: DTPBPtr; async: Boolean): OSErr;
paramBlock
A pointer to a desktop parameter block.
async
A Boolean value that specifies asynchronous (TRUE) or synchronous (FALSE) execution.
-->ioCompletionProcPtrA pointer to a completion routine.
\xAEioResultOSErrThe result code.
-->ioNamePtrStringPtrA pointer to the application's name.
-->ioDTRefNumIntegerThe desktop database reference number.
-->ioIndexIntegerAn index into the application list.
\xAEioTagInfoLongIntThe application's creation date.
-->ioFileCreatorOSTypeThe application's signature.
\xAEioAPPLParIDLongIntThe application's parent directory.

DESCRIPTION
For an application in the database specified in ioDTRefNum with the signature specified in ioFileCreator, PBDTGetAPPL returns the filename in ioNamePtr, the parent directory ID in ioAPPLParID, and the creation date in ioTagInfo. A single call, with ioIndex set to 0, finds the application file with the most recent creation date. If you want to retrieve information about all copies of the application with the given signature, start with ioIndex set to 1 and increment until ioResult returns afpItemNotFound; when called multiple times in this fashion, PBDTGetAPPL returns information about all the application's copies, including the file with the most recent creation date, in arbitrary order.

RESULT CODES
noErr0No error
ioErr-36I/O error
rfNumErr-51Reference number invalid
extFSErr-58External file system--file system identifier is nonzero
afpItemNotFound-5012Information not found

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996