do you think it may work ?
here is a little sample:
#include <windows.h>
#include <stdio.h>
int main() {
SYSTEMTIME st;
ULONGLONG tk;
ULONGLONG now;
FILETIME ft;
ULONGLONG u_boot;
FILETIME ft_boot;
SYSTEMTIME st_boot;
GetSystemTime(&st); //current time
tk = GetTickCount(); //millisenconds since last boot
SystemTimeToFileTime(&st,&ft);
now = * ((ULONGLONG*) &ft);
u_boot = (now / 10000 - tk) * 10000;
//get a FILETIME back
ft_boot = * ((FILETIME*) &u_boot);
FileTimeToSystemTime(&ft_boot,&st_boot);
printf("\nFunction Parameters");
printf("\n\tTick Count : %u",tk);
printf("\n\tSystem Time to FileTime: %I64d", now);
printf("\n\tBoot Time in 100ns : %I64d", u_boot);
printf("\nBoot Time Was : %04d-%02d-%02d
%02d:%02d:%02d.%03d", st_boot.wYear, st_boot.wMonth,st_boot.wDay,
st_boot.wHour,
st_boot.wMinute,st_boot.wSecond,st_boot.wMilliseconds);
}
Regards
L. Trivelli