Important: The information in this document is obsolete and should not be used for new development.
PBDTGetIconInfo
You can iteratively generate a list of icon types associated with each file type supported by an application by repeatedly calling thePBDTGetIconInfo
function.
FUNCTION PBDTGetIconInfo (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 of the function. --> ioDTRefNum Integer The desktop database reference number. --> ioIndex Integer An index into the icon list. --> ioTagInfo LongInt Reserved; must be set to 0. \xAE ioDTActCount LongInt The size of the icon's bitmap. \xAE ioIconType SignedByte The icon type. --> ioFileCreator OSType The icon's file creator. \xAE ioFileType OSType The icon's file type. DESCRIPTION
ThePBDTGetIconInfo
function retrieves an icon type and the associated file type supported by a given creator in the database. You use it to identify the set of icons associated with each file type that is supported by a given creator. You specify the creator by placing its signature inioFileCreator
, and you specify the database by placing the desktop database reference number in theioDTRefNum
field. ThePBDTGetIconInfo
function returns the size of the bitmap inioDTActCount
, the file type inioFileType
, and the icon size and color depth inioIconType
.The
PBDTGetIconInfo
function can return in theioIconType
field any of the values listed in the description of thePBDTGetIcon
function on page 9-12. Ignore any values returned inioIconType
that are not listed there; they represent special icons and information used only by the Finder.To step through a list of the icon types and file types supported by an application, make repeated calls to
PBDTGetIconInfo
, specifying a creator and an index value forioIndex
each call. Set the index to 1 on the first call, and increment it on each subsequent call untilioResult
returnsafpItemNotFound
.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 SEE ALSO
To get a list of file types that an application can natively open, you can use theGetFileTypesThatAppCanNativelyOpen
function, as described in the chapter "Translation Manager" of this book.