Group: File Management - Library: kernel32
Passing data records between VFP applications via the Clipboard
Peer-to-peer LAN messenger built with Mailslot API functions
Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)
Using named pipes for interprocess communication
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
);
DECLARE INTEGER ReadFile IN kernel32;
INTEGER hFile,;
STRING @ lpBuffer,;
INTEGER nNumberOfBytesToRead,;
INTEGER @ lpNumberOfBytesRead,;
INTEGER lpOverlapped
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.
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.
The function also can be used to read messages from a mailslot.