# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# MLA -- File I/O Library

- 1
- 2
…
- 58
- 59
- 60
- 61
- 62
…
- 82
- 83

• FILEIO_ERROR_INVALID_CLUSTER - The next cluster in the file is invalid.
• FILEIO_ERROR_EOF - There is no next cluster in the file (EOF)
• FILEIO_ERROR_WRITE - Cached data could not be written to the device.
Description
Reads a character from a file.
Preconditions
The drive containing the file must be mounted and the file handle must represent a valid, opened file.
Parameters
Parameters Description
handle The handle of the file.
Function
int FILEIO_GetChar ( FILEIO_OBJECT * handle)
1.7.1.3.24 FILEIO_PutChar Function
Writes a character to a file.
File
fileio_lfn.h
Syntax
int FILEIO_PutChar(char c, FILEIO_OBJECT * handle);
Returns
• If Success: FILEIO_RESULT_SUCCESS
• If Failure: FILEIO_RESULT_FAILURE
• Sets error code which can be retrieved with FILEIO_ErrorGet
• FILEIO_ERROR_READ_ONLY - The file was not opened in write mode.
• FILEIO_ERROR_WRITE_PROTECTED - The media is write-protected.
• FILEIO_ERROR_BAD_SECTOR_READ - There was an error reading the FAT to determine the next cluster in the file,
or an error reading the file data.
• FILEIO_ERROR_INVALID_CLUSTER - The next cluster in the file is invalid.
• FILEIO_ERROR_WRITE - Cached data could not be written to the device.
• FILEIO_ERROR_BAD_SECTOR_READ - File data could not be cached.
• FILEIO_ERROR_DRIVE_FULL - There are no more clusters on the media that can be allocated to the file.
Description
Writes a character to a file.
Preconditions
The drive containing the file must be mounted and the file handle must represent a valid, opened file.
Parameters
Parameters Description
c The character to write.
handle The handle of the file.
1.7 Library Interface MLA - File I/O Library Help File I/O Layer
60

- 1
- 2
…
- 58
- 59
- 60
- 61
- 62
…
- 82
- 83