ReadFile PROC   (MS-Windows)

   Reads data from a file, starting at the position indicated by the file pointer.
   After the read operation, the file pointer is adjusted unless the file has the overlapped attribute.


ReadFile PROTO,           ; read buffer from input file
    fileHandle:DWORD,     ; handle to file
    pBuffer:PTR BYTE,     ; ptr to buffer
    nBufsize:DWORD,       ; number bytes to read
    pBytesRead:PTR DWORD, ; bytes actually read
    pOverlapped:PTR DWORD ; ptr to asynchronous info

Returns: (BOOL) EAX = TRUE (non-zero) if successful,
                      FALSE (zero) if fails.

Argument Win Type MASM Type Description
fileHandle HANDLE DWORD  Handle to the file to read.
 The file handle must have GENERIC_READ access.
pBuffer LPVOID PTR BYTE  Pointer to the buffer that receives the data read from the file.
nBufsize DWORD DWORD  Number of bytes to read from the file.
pBytesRead LPDWORD PTR DWORD  Pointer to a DWORD to receive the number of bytes read.
pOverlapped LPOVERLAPED PTR DWORD  Pointer to an OVERLAPPED structure.

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)