开发者

Convert NT file time to Win32 time

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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜