| 1548 | } |
| 1549 | |
| 1550 | static NTSTATUS DOKAN_CALLBACK |
| 1551 | CryptSetFileTime(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 | |
| 1576 | static NTSTATUS DOKAN_CALLBACK CryptUnlockFile(LPCWSTR FileName, |
| 1577 | LONGLONG ByteOffset, |
nothing calls this directly
no test coverage detected