Exporting Column Headers and Attribute Values

When BatchExport calls the export callback function, it passes the ExportDataType parameter, which indicates whether the exported item contains column headers or attribute values. ExportDataType has the value EXPORT_HEADER when exporting column headers; ExportDataType has the value EXPORT_ENTRY when exporting actual data.

For each invocation of the BatchExport function, only the first export callback will have the EXPORT_HEADER value. In this callback, the data is to be interpreted as names of attributes, as specified in the first line of the export file. In subsequent callbacks, the value of the ExportDataType parameter is EXPORT_ENTRY, and the data contains values for the attributes. The order of exported attribute values matches the order of attribute names in the first export callback.

For example, you may want the value of the Comment attribute. If the Comment attribute is the sixth entry in the header array, the sixth entry of the value array of subsequent callbacks holds the attribute you want.