Important: The information in this document is obsolete and should not be used for new development.
PBDTGetAPPL
To identify the application that can open a file with a given creator, use thePBDTGetAPPL
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.
--> ioCompletion ProcPtr A pointer to a completion routine. \xAE ioResult OSErr The result code. --> ioNamePtr StringPtr A pointer to the application's name. --> ioDTRefNum Integer The desktop database reference number. --> ioIndex Integer An index into the application list. \xAE ioTagInfo LongInt The application's creation date. --> ioFileCreator OSType The application's signature. \xAE ioAPPLParID LongInt The application's parent directory. DESCRIPTION
For an application in the database specified inioDTRefNum
with the signature specified inioFileCreator
,PBDTGetAPPL
returns the filename inioNamePtr
, the parent directory ID inioAPPLParID
, and the creation date inioTagInfo
. A single call, withioIndex
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 withioIndex
set to 1 and increment untilioResult
returnsafpItemNotFound
; 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
noErr 0 No error ioErr -36 I/O error rfNumErr -51 Reference number invalid extFSErr -58 External file system--file system identifier is nonzero afpItemNotFound -5012 Information not found