Skip to content

Latest commit

 

History

History
69 lines (47 loc) · 1.63 KB

CeReadFile.md

File metadata and controls

69 lines (47 loc) · 1.63 KB

Home

Function name : CeReadFile

Group: Remote Application Programming (RAPI) - Library: rapi


This function reads data from a file, starting at the position indicated by the file pointer.


Code examples:

Pocket PC: custom RAPI class for operating with files and folders on mobile device

Declaration:

BOOL CeReadFile(
  HANDLE hFile,
  LPVOID lpBuffer,
  DWORD nNumberOfBytesToRead,
  LPDWORD lpNumberOfBytesRead,
  LPOVERLAPPED lpOverlapped
);  

FoxPro declaration:

DECLARE INTEGER CeReadFile IN rapi;
	INTEGER   hFile,;
	STRING  @ lpBuffer,;
	INTEGER   nBytesToRead,;
	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] Number of bytes to be read from the file.

lpNumberOfBytesRead [out] Pointer to the number of bytes read.

lpOverlapped [in] Unsupported; set to NULL.


Return value:

Nonzero indicates success. The CeReadFile function returns when one of the following is true: the number of bytes requested has been read or an error occurs.


Comments:

See also: CeSetFilePointer, CeWriteFile and CeCloseHandle functions.