fpFindKey()

Finds a metadata element from a KVMetadataList with a particular standardised key. This function is independent of any iteration that uses fpGetNext().

Syntax

KVErrorCode(pascal* fpFindKey)(
   const struct tag_KVMetadataList* pMetadata,
   KVMetadataKey eKey,
   const KVMetadataElement** ppMetadataElement);

Arguments

pMetadata A pointer to a KVMetadataList that you obtained by calling fpGetMetadataList() or fpGetSubFileMetadataList(). This must be the same KVMetadataList pointer that you are calling fpFindKey() on.
eKey

A value of the KVMetadataKey enumeration that identifies the piece of metadata you requested.

ppMetadataElement

A pointer to a const KVMetadataElement pointer. On success, this value points to a KVMetadataElement whose eKey member matches the eKey value supplied, or it is set to NULL if there is no matching element.

Returns

The return value is an error code.

Lifetime and Memory Management

The KVMetadataElement that was returned in ppMetadataElement does not need to be freed, but is only valid while the KVMetadataList has not been freed. After you free the KVMetadataList, all elements associated with it are invalid, and you must not access any of their members.