G
Guest
Hello everyone,
I am using Windows API open (create) a new file by CreateFile,
http://msdn2.microsoft.com/en-us/library/aa363858.aspx
the return value is HANDLE, if I use fwrite to write content to the file,
since fwrite requires FILE* as parameter. I think HANDLE is not the same as
FILE*, right?
Are there any ways (or methods) to transform HANDLE to FILE*?
I have tried that passing HANDLE directly to fwrite (forcely convert from
HANDLE from FILE*) will cause access violation exception. I think the reason
is HANDLE is not the same as FILE*, is that correct?
thanks in advance,
George
I am using Windows API open (create) a new file by CreateFile,
http://msdn2.microsoft.com/en-us/library/aa363858.aspx
the return value is HANDLE, if I use fwrite to write content to the file,
since fwrite requires FILE* as parameter. I think HANDLE is not the same as
FILE*, right?
Are there any ways (or methods) to transform HANDLE to FILE*?
I have tried that passing HANDLE directly to fwrite (forcely convert from
HANDLE from FILE*) will cause access violation exception. I think the reason
is HANDLE is not the same as FILE*, is that correct?
thanks in advance,
George