| 306 | } |
| 307 | |
| 308 | BOOL CryptFileForward::FlushOutput(LONGLONG& beginblock, BYTE *outputbuf, int& outputbytes) |
| 309 | { |
| 310 | long long outputoffset = FILE_HEADER_LEN + beginblock*CIPHER_BS; |
| 311 | |
| 312 | GoShared(); |
| 313 | |
| 314 | OVERLAPPED ov; |
| 315 | SetOverlapped(&ov, outputoffset); |
| 316 | |
| 317 | DWORD outputwritten; |
| 318 | |
| 319 | if (!WriteFile(m_handle, outputbuf, outputbytes, &outputwritten, &ov)) { |
| 320 | return FALSE; |
| 321 | } |
| 322 | |
| 323 | if (outputwritten != outputbytes) { |
| 324 | return FALSE; |
| 325 | } |
| 326 | |
| 327 | outputbytes = 0; |
| 328 | beginblock = 0; |
| 329 | |
| 330 | return TRUE; |
| 331 | } |
| 332 | |
| 333 | // write version and fileid to empty file before writing to it |
| 334 |
nothing calls this directly
no test coverage detected