TDMS_ReadInMemoryFileBytes
- Updated2023-02-21
- 1 minute(s) read
TDMS_ReadInMemoryFileBytes
int TDMS_ReadInMemoryFileBytes (TDMSFileHandle file, unsigned __int64 offset, void *data, unsigned __int64 numBytesToRead, unsigned __int64 *actualNumBytesRead);
Purpose
Gets the bytes from the in-memory file.
Call TDMS_GetInMemoryFileSize to determine how many bytes are in the 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. |
offset | unsigned __int64 | The offset at which to start reading. |
numBytesToRead | unsigned __int64 | The number of bytes to read. This should not be greater than the size of the data buffer. |
Output | ||
Name | Type | Description |
data | void * | A buffer in which to save in-memory file bytes. |
actualNumBytesRead | unsigned __int64 | The number of bytes that were actually read. |
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_ReadInMemoryFileBytes function.