Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5340

Read TDMS from C++

$
0
0

hi all,

we are trying to read the TDMS property by using the TDM C DLL sample, copied the sample code below

// Reads the file
static int ReadFile (void)
{
int ddcError = 0, length;
DDCFileHandle file = 0;
char *property = 0;


// Read file name
ddcChk (DDC_OpenFileEx (FILE_PATH, "TDM", 1, &file));
ddcChk (DDC_GetFileStringPropertyLength (file, DDC_FILE_NAME, &length));
nullChk (property = malloc (length + 1));
ddcChk (DDC_GetFileProperty (file, DDC_FILE_NAME, property, length + 1));


printf ("File name property: %s\n", property);
free (property);
property = 0;


// Read file description, if present
if (DDC_GetFileStringPropertyLength (file, DDC_FILE_DESCRIPTION, &length) >= 0)
{
nullChk (property = malloc (length + 1));
ddcChk (DDC_GetFileProperty (file, DDC_FILE_DESCRIPTION, property, length + 1));


printf ("File description property: %s\n", property);
free (property);
property = 0;
}

We are able to read the property length, but we need to read the value of wf_increment.
Any help on this is appreciable.


Viewing all articles
Browse latest Browse all 5340

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>