ReadFile
E724274
ReadFile is a core Windows API function in Kernel32.dll used to read data from files, pipes, and other I/O devices into a buffer.
Statements (47)
| Predicate | Object |
|---|---|
| instanceOf | Win32 function ⓘ |
| callingConvention | stdcall ⓘ |
| canReadFrom |
anonymous pipes
ⓘ
character devices ⓘ communications devices ⓘ consoles ⓘ files ⓘ named pipes ⓘ sockets via file handle abstractions ⓘ |
| category |
file I/O
ⓘ
low-level I/O ⓘ |
| definedInLibrary | Kernel32.dll NERFINISHED ⓘ |
| documentationSite | https://learn.microsoft.com/windows/win32/api/fileapi/nf-fileapi-readfile ⓘ |
| errorRetrieval | GetLastError ⓘ |
| exportedBy | Kernel32.dll ⓘ |
| headerDeclaredIn |
WinBase.h
ⓘ
Windows.h ⓘ |
| introducedIn | early versions of Win32 API ⓘ |
| module | Kernel32 NERFINISHED ⓘ |
| operatingSystem |
Windows
ⓘ
surface form:
Microsoft Windows
|
| parameter |
DWORD nNumberOfBytesToRead
ⓘ
HANDLE hFile ⓘ LPDWORD lpNumberOfBytesRead ⓘ LPOVERLAPPED lpOverlapped ⓘ LPVOID lpBuffer ⓘ |
| partOf |
Win32 API
NERFINISHED
ⓘ
Windows API NERFINISHED ⓘ |
| purpose | read data from a file or I/O device ⓘ |
| requires |
sufficient buffer size
ⓘ
valid file handle ⓘ |
| returns | BOOL ⓘ |
| returnValueMeaning |
nonzero indicates success
ⓘ
zero indicates failure ⓘ |
| supportsFeature |
EOF detection via bytes read
ⓘ
I/O completion ports when used with overlapped I/O ⓘ cancellation via CancelIo or CancelIoEx ⓘ |
| supportsMode |
overlapped (asynchronous) I/O
ⓘ
synchronous I/O ⓘ |
| supportsPlatform |
Windows 2000 and later
NERFINISHED
ⓘ
Windows 95 family NERFINISHED ⓘ Windows NT family NERFINISHED ⓘ |
| threadSafety | depends on handle usage and synchronization ⓘ |
| usedWith |
CancelIo
ⓘ
CloseHandle ⓘ CreateFile ⓘ ReadFileEx ⓘ SetFilePointer NERFINISHED ⓘ |
Referenced by (1)
Full triples — surface form annotated when it differs from this entity's canonical label.