ProgressBar of write/copy a file from resources
Hi!
I have issue with reading "bytesWritten: from WriteFile in a second thread of application.
1 2 3
|
HANDLE hFile = CreateFile(_T(".\\tmpRes.dat"), GENERIC_WRITE|GENERIC_READ, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
WriteFile(hFile, pData, size, &bytesWritten, NULL);
|
In Another thread I tried:
1 2 3 4 5 6 7 8 9
|
DWORD fsizeat = GetFileSize( hFile, NULL ); //but is always < 1
//and sinple way
[WRITEONSCREEN](bytesWritten);
//I try with
SetFilePointer(hFile,0,&dist,FILE_CURRENT);
|
but always write 0
file saves correctly
Please help!
Topic archived. No new replies allowed.