LONGLONG FileTimeToMillSeconds(FILETIME* pTime)
{
ULARGE_INTEGER ui;
ui.LowPart = pTime->dwLowDateTime;
ui.HighPart = pTime->dwHighDateTime;
return ((LONGLONG)(ui.QuadPart - 116444736000000000) / 10000);
}
LONGLONG SystemTimeToMillSeconds(SYSTEMTIME* pTime)
{
FILETIME fTime = { 0, 0 };
SystemTimeToFileTime(pTime, &fTime);
return FileTimeToMillSeconds(&fTime);
}