TradeMUX SDK Documentation  1.0
TradeMUX SDK Documentation
uint FileReadStruct< T > ( int  file_handle,
ref T  struct_object,
int  size = -1 
)

Reads contents into a structure passed as a parameter from a binary-file, starting with the current position of the file pointer

Template Parameters
TType of a structure to read into
Parameters
file_handleFile descriptor returned by FileOpen()
struct_objectReference to destination struct variable of type T
sizeNumber of bytes that should be read. If size is not specified or the indicated value is greater
than the size of the structure, the exact size of the specified structure is used
Returns
If successful the function returns the number of bytes read or 0 in case of error.
If successful, the number of bytes read corresponds to the size of the structure.
To obtain information about the error call the GetLastError() function. File pointer is moved by the same number of bytes.
Type Constraints
T :struct