Read Reads specified number of bytes PARAM: buffer - buffer to read to count - number of bytes to read RETURN: number of bytes read -1 if error ************************************************/
| 343 | -1 if error |
| 344 | ************************************************/ |
| 345 | int CUT_FileDataSource::Read(LPSTR buffer, size_t count) { |
| 346 | // Wrong parameter |
| 347 | if(buffer == NULL) return -1; |
| 348 | |
| 349 | m_nLoadedDataSize = 0; |
| 350 | |
| 351 | // Read data from the file |
| 352 | return m_file.Read(buffer, (DWORD)count); |
| 353 | } |
| 354 | |
| 355 | /*********************************************** |
| 356 | Write |