Reputation: 5824
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?
Upvotes: 1
Views: 786
Reputation: 13318
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;
Upvotes: 3