Store an icon
Source position: icon.pas line 243
function PutIconTagList( |
const Name: PChar; |
const Icon: PDiskObject; |
const Tags: PTagItem |
):SmallInt; |
Name |
|
Name of the object the icon is to be stored for, or nil if a default icon is to be stored. |
Icon |
|
The icon to be stored. |
Tags |
|
Storage options. (ICONPUTA_*) |
True if the icon file could be stored, FALSE otherwise. You can use IoErr() to retrieve the error code or use the ICONA_ErrorCode tag instead.
This function is used to store an icon; the icon can belong to a file/drawer/volume or it can be a default icon.
This function is a superset of PutDefDiskObject() and PutDiskObject().
If the name of the icon file to be stored would be too long to fit (as set with IconControlA(..., ICONCTRLA_SetGlobalMaxNameLength, ...)) then PutIconTagList() will silently pretend that the icon file has been written to disk. However, it will not store the icon file on the disk since there would a risk of accidentally overwriting the file the icon belongs to. If you want to know whether the icon you wrote was in fact written to disk, provide an error code pointer with the ICONA_ErrorCode tag. If the name of the file was too long, PutIconTagList() will still pretend that the icon file was written successfully, but the error code ERROR_TOO_MANY_LEVELS will be stored in the variable you passed in with the ICONA_ErrorCode tag.
|
Retrieve an icon |
|
|
Write disk object as the default for its type. |
|
|
Write out a DiskObject to disk. |