LMarker::Load

#include "ltwrappr.h"

virtual L_INT LMarker::Load(pszFilename, uFlags)

L_TCHAR * pszFilename;

/* file name*/

L_UINT uFlags;

/* reserved flag */

Loads metadata markers (COM and APPn) into a handle

Parameter

Description

pszFilename

Character string that contains the name of the file from which to load the collection of metadata markers.

uFlags

Reserved for future use. Pass 0.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes

Comments

For Exif files, this metadata handle will contain ALL the Exif and GPS comments, stored in APP1. It will also contain the audio information stored in APP2.

The markers can also be retrieved by calling LFile::TransformFile. Each retrieved marker is passed to the LFile::TransformFileCallBack function. There is one important difference between the markers passed to LFile::TransformFileCallBack and those loaded with LMarker::Load:

LFile::TransformFileCallBack receives ALL the markers (metadata and image-related markers)

LMarker::Load loads only the metadata markers

To save the collection of metadata markers referenced by this object to a file, call the LMarker::SetAsGlobalMarkers function.

IMPORTANT NOTE:

The comments set with LFileSettings::SetComment will OVERRIDE any comments contained in the metadata markers. For example, if the original file had an author of "Steve" and you call

LFileSettings::SetComment(CMNT_SZAUTHOR, "John", 5);

the next time you save a file, the author will be John (not Steve). However, all the comments that have not been set will be taken from the metadata handle.

Required DLLs and Libraries

LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LMarker::Copy, LMarker::Create, LMarker::Delete, LMarker::DeleteIndex, LMarker::Enum, LMarker::EnumMarkersCallBack, LMarker::Free, LMarker::GetCount, LMarker::GetGlobalMarkers, LMarker::GetHandle, LMarker::Insert, LMarker::SetAsGlobalMarkers, LMarker::SetHandle, LFile::WriteMetaData, LFile::TransformFile, LFile::TransformFileCallBack, Class Members

Example

For an example, refer to LMarker::DeleteIndex.