I need to convert the LARGE_INTEGER CreationTime member in this structure to the FILETIME ftCreationTime member in this structure. The times are in different formats so simply casting it does开发者_开发百科 not work, is there any documentation on what format NT API uses for file time and how I could convert it?
They are the same representation, just different structures. You can either memcpy it across or manual assignment:
FILETIME ft;
LARGE_INTEGER creationTime;
memcpy(&ft, &creationTime, sizeof(ft));
or
FILETIME ft;
LARGE_INTEGER creationTime;
ft.dwLowDateTime = creationTime.LowPart;
ft.dwHighDateTime = creationTime.HighPart;
精彩评论