Enumerates all the tags in a file. Currently, only TIFF and Exif files contain tags.

Parameter

Description

pszFile

Character string containing the name of the file in which to enumerate the tags.

uFlags

Flags parameter. Reserved for future use. Pass 0.

pfnCallback

Callback function for enumerating each tag. Use the function pointer as the value of this parameter.

L_EnumFileTags calls this callback function for each tag. The callback function must adhere to the function prototype described in the ENUMTAGSCALLBACK callback function.

pUserData

Void pointer that you can use to pass one or more additional parameters that the callback function needs.

To use this feature, assign a value to a variable or create a structure that contains as many fields as you need. Then, in this parameter, pass the address of the variable or structure, casting it to L_VOID *. The callback function, which receives the address in its own pUserData parameter, can cast it to a pointer of the appropriate data type to access your variable or structure.

Returns

Comments

For multipage TIFF files, you can enumerate the tags from a particular page. Specify the page number on which to enumerate the tags using the pLoadOptions structure. For more information, refer to the LOADFILEOPTION structure.

This function enumerates the standard TIFF tags and the user tags. Standard TIFF tags are less than 32767. User TIFF tags are usually between 32768 and 65535.

Note that if ENUMTAGSCALLBACK returns a value other than SUCCESS, L_EnumFileTags will stop enumerating the tags and return the value returned by ENUMTAGSCALLBACK as its return value.

Do not attempt to use the L_DeleteTag function to delete tags from inside an ENUMTAGSCALLBACK callback function. If you want to delete tags that you enumerate, use ENUMTAGSCALLBACK to add the tags to a list. Upon returning from L_EnumFileTags, you can delete all the tags from the list.

For general information about TIFF tags, refer to Implementing TIFF Comments and Tags.