Lifetime of Values

Ownership of structures is synchronous for BatchExport function calls. When the BatchExport function calls the DAPI_FNExportEntry export callback function, the data in the DAPI_ENTRY structure remains valid only until the calling function returns. This is because the BatchExport function reuses the same structures when it exports data in its next export operation. Therefore, you must either write the data to a file or make a copy of it in memory. You cannot merely reference it with a pointer after returning from the callback.