Unit 'icon' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#os4units]

PutIconTagList

Store an icon

Declaration

Source position: icon.pas line 257

function PutIconTagList(

  const Name: PChar;

  const Icon: PDiskObject;

  const Tags: PTagItem

):LongBool;

Arguments

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_*)

Function result

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.

Description

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.

See also

GetIconTagList

  

Retrieve an icon

PutDefDiskObject

  

Write disk object as the default for its type.

PutDiskObject

  

Write out a DiskObject to disk.


Documentation generated on: 2021-07-30