LabWindows/CVI

TDMS_OpenInMemoryFileFromDisk

int TDMS_OpenInMemoryFileFromDisk (const char *filePath, TDMSFileHandle *file);

Purpose

Creates a file handle for a new in-memory .tdms file from a file on disk. Pass the new file handle to other TDM Streaming Library functions to read or modify the file contents. Call TDMS_SaveInMemoryFileToDisk to save the file to disk.

Call the TDMS_CloseFile function to close the file handle when you finish using the file.

Parameters

Input
Name Type Description
filePath const char * The path to the file that will be opened. If this value is not an absolute pathname, then the pathname is relative to the current working directory.
Output
Name Type Description
file TDMSFileHandle The handle for the TDM Streaming file. Pass this handle to TDM Streaming Library functions that require a file. Call TDMS_SaveInMemoryFileToDisk to save the file to disk. Call TDMS_CloseFile to close the file handle when you finish using the file.

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 2019 and later

© 2016 National Instruments. All rights reserved.