Important: The information in this document is obsolete and should not be used for new development.
PBDTAddIcon
To add an icon definition to the desktop database, use thePBDTAddIcon
function.
FUNCTION PBDTAddIcon (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. --> ioTagInfo LongInt Reserved; must be set to 0. --> ioDTBuffer Ptr A pointer to the icon's data. --> ioDTReqCount LongInt The size of the icon's bitmap. --> ioIconType SignedByte The icon type. --> ioFileCreator OSType The icon's file creator. --> ioFileType OSType The icon's file type. DESCRIPTION
ThePBDTAddIcon
function adds an icon definition to the desktop database specified inioDTRefNum
. You specify the creator and file type that the icon is associated with in theioFileCreator
andioFileType
fields. For the icon type inioIconType
, specify either a constant or a value from the following list.The value you supply in
ioDTReqCount
is the size in bytes of the buffer that you've allocated for the icon's bitmap pointed to byioDTBuffer
; this value depends on the icon type. Be sure to allocate enough storage for the icon data; 1024 bytes is the largest amount required for any icon in System 7. For the number of bytes inioDTReqCount
, you specify either a constant or a value from the following list.You pass a pointer to the icon bitmap in the
ioDTBuffer
field. You must initialize theioTagInfo
field to 0.If the database already contains an icon definition for an icon of that type, file type, and file creator, the new definition replaces the old.
RESULT CODES