Reads contents into a structure passed as a parameter from a binary-file, starting with the current position of the file pointer
- Template Parameters
-
T | Type of a structure to read into |
- Parameters
-
file_handle | File descriptor returned by FileOpen() |
struct_object | Reference to destination struct variable of type T |
size | Number 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.