TDMS_GetFileStringPropertyLength
- Updated2023-02-21
- 3 minute(s) read
int TDMS_GetFileStringPropertyLength (TDMSFileHandle file, const char *property, unsigned int *length);
Purpose
Gets the length of the current value of a string property. The length does not include the terminating NUL byte.
You can call this function to determine the necessary buffer size before getting the value of a string property.
Parameters
| Input | |||||||||||||||||||||||||||||||||||||||
| Name | Type | Description | |||||||||||||||||||||||||||||||||||||
| file | TDMSFileHandle | The file handle. You obtain this handle from the TDMS_OpenFileEx, TDMS_CreateFileEx, TDMS_AdvancedOpenFile, or TDMS_AdvancedCreateFile function. | |||||||||||||||||||||||||||||||||||||
| property | const char * | The name of the file property. You can specify a built-in property, virtual property, or a property created by TDMS_SetFileProperty. Virtual properties are special properties that are not saved in the .tdms file, but they can be used to perform certain actions. The following built-in properties are available:
The following virtual properties are available:
|
|||||||||||||||||||||||||||||||||||||
| Output | |||||||||||||||||||||||||||||||||||||||
| Name | Type | Description | |||||||||||||||||||||||||||||||||||||
| length | unsigned int | The length of the current value of the string property. The length does not include the terminating NUL byte. | |||||||||||||||||||||||||||||||||||||
Return Value
| Name | Type | Description |
| status | int | Return value indicating whether the function was successful. Unless otherwise stated, zero represents successful execution and a negative number represents the error code. Error codes are defined in cvi\include\cvitdms.h. |
Additional Information
Library: TDM Streaming Library
Include file: cvitdms.h
LabWindows/CVI compatibility: LabWindows/CVI 8.1 and later
© 2016 National Instruments. All rights reserved.
Example
Refer to TDM Streaming\tdmsReader.cws for an example of using the TDMS_GetFileStringPropertyLength function.
