This file defines file management functions of PwnOS.
| Files.asm | This file defines file management functions of PwnOS. |
| Functions | |
| OpenFile | This procedure opens a file. |
| GetFileSize | This procedure gets the size of an open file. |
| ReadFile | This procedure reads data from an open file. |
| CloseFile | This procedure closes an open file, freeing all of its resources. |
| GetCurrentDirectory | Gets the current directory of the current thread. |
| Gateway Functions of Files.asm | |
| Functions | |
| OpenFileU | Gateway function for OpenFile |
| GetFileSizeU | Gateway function for GetFileSize |
| ReadFileU | Gateway function for ReadFile |
| WriteFileU | Gateway function for <WriteFile> |
| CloseFileU | Gateway function for CloseFile |
This procedure opens a file.
| pName | address of unicode filename |
| Access | access options |
| Creation | creation options |
| Flags | miscellaneous |
This procedure gets the size of an open file.
| pFile | address of FILE structure |
| edx:eax | size of the file in bytes, or -1 if the file has no particular size |
This procedure reads data from an open file.
| pFile | address of FILE structure |
| pDestination | address to which the data is to be read |
| nBytes | number of bytes to read |
This procedure closes an open file, freeing all of its resources.
| pFile | address of FILE structure |
Gets the current directory of the current thread.
Not Implemented
| Functions | |
| OpenFileU | Gateway function for OpenFile |
| GetFileSizeU | Gateway function for GetFileSize |
| ReadFileU | Gateway function for ReadFile |
| WriteFileU | Gateway function for <WriteFile> |
| CloseFileU | Gateway function for CloseFile |
Gateway function for OpenFile
TODO: Check parameters.
Gateway function for GetFileSize
TODO: Check parameter.
Gateway function for ReadFile
TODO: Check parameters.
Gateway function for CloseFile
TODO: Check parameter.