GeSHi (asm):
; Create both input and output handles
invoke CreateFile, inputFileName, GENERIC_READ, FILE_SHARE_READ, NULL,\
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL
cmp eax, INVALID_HANDLE_VALUE
je .fail
mov [hInput], eax
invoke CreateFile, outputFileName, GENERIC_WRITE, 0, NULL,\
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL
cmp eax, INVALID_HANDLE_VALUE
je .fail
mov [hOutput], eax
; Do stuff
invoke ReadFile, hInput, line, 256, numBytesRead, NULL
invoke WriteFile, hOutput, line, numBytesRead, numBytesWritten, NULL
invoke CloseHandle, hInput
invoke CloseHandle, hOutputCreated by GeSHI 1.0.7.18
The opening of both files appears to work fine, but when reading nothing is read and ReadFile returns FALSE. The only thing I'm unsure about in that code is numBytesRead and numBytesWritten. Should I be declaring them like:
GeSHi (asm):
numBytesRead dd ?
numBytesWritten dd ?Created by GeSHI 1.0.7.18
or:
GeSHi (asm):
numBytesRead: dd ?
numBytesWritten: dd ?Created by GeSHI 1.0.7.18
So that numBytesRead/Written point to the dword?