fpGetMetadataList()

Gets the metadata from a document. You can use this function to access all available metadata including document properties, OLE summary information, and XMP metadata. For more information about accessing metadata, see Use the Metadata API.

If the file is a container, you can access metadata for its subfiles by using the Extract API. See the function fpGetSubFileMetadataList().

Syntax

KVErrorCode (pascal* fpGetMetadataList)(
    KVDocument pDocument,
    const KVMetadataList** const ppMetadataList);

Arguments

pDocument

A KVDocument that you created with fpOpenDocumentFromFile() or fpOpenDocumentFromStream().

ppMetadataList

A pointer to a KVMetadataList*. On success, fpGetMetadataList() will set this to the address of a new KVMetadataList struct that contains the function pointers for accessing the metadata elements.

Returns

  • If the call is successful, the return value is KVError_Success.
  • If the call is not successful, the return value is an error code that indicates the problem.

Lifetimes and Memory Management

  • If the function returns KVError_Success, you must free the KVMetadataList pointer using its fpFree() function.
  • You must free ppMetadataList before you close pDocument.

Example

const KVMetadataList* metadataList = NULL;
error = filterInterface->fpGetMetadataList(pDocument, &metadataList);