StormLib API Reference
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.
- [in] Handle to an open file. The file handle must have been created by SFileOpenFileEx.
- [out] Pointer to buffer that will receive loaded data. The buffer size must be greater or equal to dwToRead.
- [in] Number of bytes to be read.
- [out] Pointer to DWORD that will receive number of bytes read.
- [in] If hFile is handle to a local disk file, lpOverlapped is passed to ReadFile. Otherwise not used.
- 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.
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
|Ordinal number in Storm.dll 1.00
|Ordinal number in Storm.dll 1.09
Copyright (c) Ladislav Zezula 2003 - 2010