|
|
От: |
okman
|
https://searchinform.ru/ |
| Дата: | 07.04.12 10:34 | ||
| Оценка: | 4 (2) | ||
for(DWORD i=0; i<dwBuffer; i=i+SystemInfo.dwPageSize)
{
bIReadFile=InternetReadFile(hRequest, Buffer, SystemInfo.dwPageSize, &dwNumberOfBytesRead);
BOOL bWriteFile=WriteFileEx(hFile, Buffer,dwNumberOfBytesRead, &ovl, NULL);
ovl.Offset+=dwNumberOfBytesRead;
}
return 0;
}The OVERLAPPED data structure must remain valid for the duration of the write operation. It should not be a variable that can go out of scope while the write operation is pending completion.