MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / FlushOutput

Method FlushOutput

libcppcryptfs/file/cryptfile.cpp:308–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308BOOL 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

Callers

nothing calls this directly

Calls 1

SetOverlappedFunction · 0.85

Tested by

no test coverage detected