StormLib API Reference
SFileReadFile
Description
bool WINAPI SFileReadFile(
HANDLE hFile, // File handle
VOID * lpBuffer, // Pointer to buffer where to read the data
DWORD dwToRead, // Number of bytes to read
DWORD * pdwRead, // Pointer to variable that receivs number of bytes read
LPOVERLAPPED lpOverlapped // Pointer to OVERLAPPED structure
);
Function SFileReadFile reads data from an open file.
Parameters
- hFile
- [in] Handle to an open file. The file handle must have been created by SFileOpenFileEx.
- lpBuffer
- [out] Pointer to buffer that will receive loaded data. The buffer size must be greater or equal to dwToRead.
- dwToRead
- [in] Number of bytes to be read.
- pdwRead
- [out] Pointer to DWORD that will receive number of bytes read.
- lpOverlapped
- [in] If hFile is handle to a local disk file, lpOverlapped is passed to ReadFile. Otherwise not used.
Return Value
- When all requested bytes have been read, the function returns true.
- When less than requested bytes have been read, the function returns false and GetLastError returns ERROR_HANDLE_EOF.
- If an error occured, the function returns false and GetLastError returns an error code different from ERROR_HANDLE_EOF.
Remarks
This function behaves a bit differently than Win32 API ReadFile in case that not all bytes
are available in the file. Users of SFileReadFile must be aware of that.
Availability in Storm.dll
Available in Storm.dll |
Yes |
Ordinal number in Storm.dll 1.00 |
80 (0x050) |
Ordinal number in Storm.dll 1.09 |
269 (0x10D) |
Copyright (c) Ladislav Zezula 2003 - 2010