How to do it? I want it loaded on one Buffer.
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.
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.
What is the last byte of the File? Should I replace it with 0x0d0a?
why would you want to add CRLF? If there is a valid reason, go ahead and change.
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