Hello kvlclib
This example shows a simple conversion from .kme50 to .csv using kvlclib.
static void check(const char* s, int stat)
{
printf("%s returned %d\n", s, stat);
exit(1);
}
}
int main()
{
check("kvlcCreateConverter", stat);
check("kvlcSetInputFile", stat);
do {
printf("File already exists!\n");
check("kvlcConvertEvent", stat);
}
check("kvlcIsOverrunActive", stat);
if (overrun){
printf("NOTE! The extracted data contained overrun.\n");
}
check("kvlcIsDataTruncated", stat);
if (truncated){
printf("NOTE! The extracted data was truncated.\n");
}
check("kvlcDeleteConverter", stat);
return 0;
}
As could be seen, kvlclib does not overwrite files by default. We had to check kvlcConvertEvent for kvlcERR_FILE_EXISTS.
printf("File already exists!\n");
If we want to enable automatic overwrites on the converter, we can set the property KVLC_PROPERTY_OVERWRITE.
- See also
- Properties