ReadFromFile PROC
Reads an input file into a buffer.
Call args: EAX = an open file handle
EDX = offset of the input buffer
ECX = maximum number of bytes to read
Return arg:
If CF = 0, EAX contains the number of bytes read.
If CF = 1, EAX contains a system error code. Call WriteWindowsMsg
to get a text representation of the error.
Example:
.data
BUFSIZE = 5000
buffer BYTE BUFSIZE DUP(?)
bytesRead DWORD ?
.code
mov eax,fileHandle
mov edx,OFFSET buffer
mov ecx,BUFSIZE
call ReadFromFile
jc show_error_message
mov bytesRead,eax
| Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |