LabWindows/CVI

Content Type
Programming Language
Current manual
Table of Contents

TDMS_GetInMemoryFileSize

TDMS_GetInMemoryFileSize

int TDMS_GetInMemoryFileSize (TDMSFileHandle file, unsigned __int64 *fileSizeInBytes);

Purpose

Gets the size, in bytes, of the in-memory .tdms file. Call this function to determine how many bytes you have to read.

Call TDMS_ReadInMemoryFileBytes to read bytes from an in memory tdms file.

Parameters

Input
Name Type Description
file TDMSFileHandle The file handle. You obtain this handle from the TDMS_CreateInMemoryFile, TDMS_OpenInMemoryFileFromData, or TDMS_OpenInMemoryFileFromDisk function.
Output
Name Type Description
fileSizeInBytes unsigned __int64 The in-memory file size in bytes.

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.

Example

Refer to TDM Streaming\Advanced Read and Write\TDMS In Memory Write and Read\TDMS In Memory Write and Read.cws for an example of using the TDMS_GetInMemoryFileSize function.

Was this information helpful?