MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / DOKAN_CALLBACK CryptSetFileTime

Function DOKAN_CALLBACK CryptSetFileTime

cppcryptfs/dokan/cryptdokan.cpp:1550–1574  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1548}
1549
1550static NTSTATUS DOKAN_CALLBACK
1551CryptSetFileTime(LPCWSTR FileName, CONST FILETIME *CreationTime,
1552 CONST FILETIME *LastAccessTime, CONST FILETIME *LastWriteTime,
1553 PDOKAN_FILE_INFO DokanFileInfo) {
1554 FileNameEnc filePath(DokanFileInfo, FileName);
1555 HANDLE handle;
1556
1557 handle = (HANDLE)DokanFileInfo->Context;
1558
1559 DbgPrint(L"SetFileTime %s, handle = %I64x\n", FileName, (ULONGLONG)handle);
1560
1561 if (!handle || handle == INVALID_HANDLE_VALUE) {
1562 DbgPrint(L"\tinvalid handle\n\n");
1563 return STATUS_INVALID_HANDLE;
1564 }
1565
1566 if (!SetFileTime(handle, CreationTime, LastAccessTime, LastWriteTime)) {
1567 DWORD error = GetLastError();
1568 DbgPrint(L"\terror code = %d\n\n", error);
1569 return ToNtStatus(error);
1570 }
1571
1572 DbgPrint(L"\n");
1573 return STATUS_SUCCESS;
1574}
1575
1576static NTSTATUS DOKAN_CALLBACK CryptUnlockFile(LPCWSTR FileName,
1577 LONGLONG ByteOffset,

Callers

nothing calls this directly

Calls 2

DbgPrintFunction · 0.85
ToNtStatusFunction · 0.85

Tested by

no test coverage detected