fpGetSubFileMetaData()

This function extracts metadata from mail stores, mail messages, and non-mail items in an NSF file. See Extract Mail Metadata.

Syntax

int (pascal *fpGetSubFileMetaData)  (
			    void                      *pFile, 
			    KVGetSubFileMetaArg        metaArg, 
		    KVSubFileMetaData         *metaData);

Arguments

pFile The identifier of the file. This is a file handle returned from fpOpenFile().
metaArg

A pointer to the KVGetSubFileMetaArg structure, which defines metadata tags whose values are retrieved.

Before you initialize the KVGetSubFileMetaArg structure, use the KVStructInit macro to initialize the KVStructHead structure.

metaData A pointer to the KVSubFileMetaData structure, which contains the retrieved metadata values.

Returns

Discussion

Example

KVSubFileMetaData  metaData = NULL;

KVStructInit(&metaArg);

/* retrieve all the default metadata elements */
metaArg.metaNameCount = 0;
metaArg.metaNameArray = NULL;
metaArg.index = Index;

error = extractInterface->fpGetSubFileMetaData(pFile,&metaArg,&metaData);
...

extractInterface->fpFreeStruct(pFile,metaData);
metaData = NULL;


/* retrieve specific metadata fields */
KVMetaName   pName[2];
KVMetaNameRec names[2];

names[0].type = KVMetaNameType_Integer;
names[0].name.iname = KVPR_SUBJECT;

names[1].type = KVMetaNameType_Integer;
names[1].name.iname = KVPR_DISPLAY_TO;

pName[0] = &names[0];
pName[1] = &names[1];

metaArg.metaNameCount = 2;
metaArg.metaNameArray = pName;
metaArg.index = Index;

error = extractInterface->fpGetSubFileMetaData (pFile,&metaArg,&metaData);
...
extractInterface->fpFreeStruct(pFile,metaData);
metaData = NULL;

_HP_HTML5_bannerTitle.htm