How to do it? I want it loaded on one Buffer.
Posted on 2003-11-13 05:24:24 by realvampire
create a buffer big enough for all files.
read the first file into the buffer then add the value returned thru the lpNumberOfBytesRead arugment of ReadFile to the buffer pointer and read in the next file and so on.
Posted on 2003-11-13 06:52:27 by ENF
What is the last byte of the File? Should I replace it with 0x0d0a?
Posted on 2003-11-14 08:01:36 by realvampire
why would you want to add CRLF? If there is a valid reason, go ahead and change.
Posted on 2003-11-14 08:20:22 by roticv
The last byte depends on the file. There is no need of CRLF (0D0Ah), casually most text files end with CRLF but you cannot rely on that fact.

invoke ReadFile,[hfile],esi,[filesize],io_bytes,NULL
test eax,eax
jz error_read
add esi,[io_bytes]

;esi is ready to receive next file if buffer is big enough

mov al,[esi-1] ; the last byte is stored in al

Posted on 2003-11-14 08:27:40 by pelaillo