 |
ReadFile ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
Reads data from a file, starting at the position indicated by the file pointer. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
BOOL ReadFile(
HANDLE hFile, // handle to file
LPVOID lpBuffer, // data buffer
DWORD nNumberOfBytesToRead, // number of bytes to read
LPDWORD lpNumberOfBytesRead, // number of bytes read
LPOVERLAPPED lpOverlapped // overlapped buffer
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER ReadFile IN kernel32;
INTEGER hFile,;
STRING @ lpBuffer,;
INTEGER nNumberOfBytesToRead,;
INTEGER @ lpNumberOfBytesRead,;
INTEGER lpOverlapped
|
 |
 |
 |
| Parameters: |
 |
hFile
[in] Handle to the file to be read. The file handle must have been created with GENERIC_READ access to the file.
lpBuffer
[out] Pointer to the buffer that receives the data read from the file.
nNumberOfBytesToRead
[in] Specifies the number of bytes to be read from the file.
lpNumberOfBytesRead
[out] Pointer to the variable that receives the number of bytes read.
lpOverlapped
[in] Pointer to an OVERLAPPED structure. This structure is required if hFile was created with FILE_FLAG_OVERLAPPED. |
 |
 |
| Return value: |
 |
If the function succeeds, the return value is nonzero. If the return value is nonzero and the number of bytes read is zero, the file pointer was beyond the current end of the file at the time of the read operation.
|
 |
 |
| My comment: |
 |
| The function also can be used to read messages from a mailslot. |
 |
 |
| Word Index links for the ReadFile : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2001-11-28 18:54:36 | | Modified: | 2002-01-26 14:43:49 | Visited in last 7 days: 45 |