[英]Converting __int64 to FileTime
I have a code which is getting SystemTime as FileTime using 我有一个代码将使用
uint64 currentUtcFileTime; uint64 currentUtcFileTime; GetSystemTimeAsFileTime((FILETIME*)¤tUtcFileTime);
GetSystemTimeAsFileTime((FILETIME *)&currentUtcFileTime);
Now I want to convert this uint64 back to FILETIME. 现在,我想将此uint64转换回FILETIME。
I searched for long and finally got this solution - 我搜索了很长时间,终于得到了这个解决方案-
FILETIME ftime; FILETIME ftime; __int64 i64;
__int64 i64;
*(__int64 *)&ftime = i64; *(__ int64 *)&ftime = i64;
It worked well for me :) 对我来说效果很好:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.