简体   繁体   中英

Converting __int64 to FileTime

I have a code which is getting SystemTime as FileTime using

uint64 currentUtcFileTime; GetSystemTimeAsFileTime((FILETIME*)&currentUtcFileTime);

Now I want to convert this uint64 back to FILETIME.

I searched for long and finally got this solution -

FILETIME ftime; __int64 i64;

*(__int64 *)&ftime = i64;

It worked well for me :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM