|
|
От: | Hare76 | |
| Дата: | 07.04.12 10:47 | ||
| Оценка: | |||
O> for(DWORD i=0; i<dwBuffer; i=i+SystemInfo.dwPageSize)
O> {
O> bIReadFile=InternetReadFile(hRequest, Buffer, SystemInfo.dwPageSize, &dwNumberOfBytesRead);
O> BOOL bWriteFile=WriteFileEx(hFile, Buffer,dwNumberOfBytesRead, &ovl, NULL);
O> ovl.Offset+=dwNumberOfBytesRead;
O> }
O> return 0;
O>}
O>O>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.