mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
dll: FspDebugLogFT
This commit is contained in:
parent
0e2b411f38
commit
c34e70f7ab
@ -202,6 +202,7 @@ FSP_API VOID FspPathCombine(PWSTR Prefix, PWSTR Suffix);
|
|||||||
FSP_API NTSTATUS FspNtStatusFromWin32(DWORD Error);
|
FSP_API NTSTATUS FspNtStatusFromWin32(DWORD Error);
|
||||||
FSP_API VOID FspDebugLog(const char *format, ...);
|
FSP_API VOID FspDebugLog(const char *format, ...);
|
||||||
FSP_API VOID FspDebugLogSD(const char *format, PSECURITY_DESCRIPTOR SecurityDescriptor);
|
FSP_API VOID FspDebugLogSD(const char *format, PSECURITY_DESCRIPTOR SecurityDescriptor);
|
||||||
|
FSP_API VOID FspDebugLogFT(const char *format, PFILETIME FileTime);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -37,3 +37,20 @@ FSP_API VOID FspDebugLogSD(const char *format, PSECURITY_DESCRIPTOR SecurityDesc
|
|||||||
else
|
else
|
||||||
FspDebugLog(format, "invalid security descriptor");
|
FspDebugLog(format, "invalid security descriptor");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FSP_API VOID FspDebugLogFT(const char *format, PFILETIME FileTime)
|
||||||
|
{
|
||||||
|
SYSTEMTIME SystemTime;
|
||||||
|
char buf[32];
|
||||||
|
|
||||||
|
if (FileTimeToSystemTime(FileTime, &SystemTime))
|
||||||
|
{
|
||||||
|
wsprintfA(buf, "%04hu-%02hu-%02huT%02hu:%02hu:%02hu.%03huZ",
|
||||||
|
SystemTime.wYear, SystemTime.wMonth, SystemTime.wDay,
|
||||||
|
SystemTime.wHour, SystemTime.wMinute, SystemTime.wSecond,
|
||||||
|
SystemTime.wMilliseconds);
|
||||||
|
FspDebugLog(format, buf);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
FspDebugLog(format, "invalid file time");
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user