General information
Category:
Windows API functions
Title:
Help with WriteFile
Hi,
I'm having problems with the following code:
LOCAL lnWrite
lnWrite = 0
IF WriteFile(lnFile, lcVal, 1, @lnWrite, 0) <> 0
llRetVal = .T.
ENDIF
I'm getting a data mismatch error and I don't know why. Am I passing something incorrectly to writefile? Could be, I had a hard time finding examples on how to use writefile.
lnFile is the file handle, its a numeric value.
lcVal is just a single character.
Here is how I declare the API function:
DECLARE INTEGER WriteFile IN kernel32;
INTEGER hFile,;
INTEGER lpBuffer,;
INTEGER nBt2Write,;
INTEGER @lpBtWritten,;
INTEGER lpOverlapped
Thanks,
Chris
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only