FILETIME to __int64

后端 未结 6 2095
日久生厌
日久生厌 2021-01-04 10:11

What is the proper way to convert a FILETIME structure into __int64? Can you please tell me?

6条回答
  •  天命终不由人
    2021-01-04 10:51

    Of course you could just pass in an __int64 casted to a filetime as follows *(FILETIME*)&int64Val. This will work fine under Visual C++.

    ie

    __int64 createTime = 0;
    __int64 accessTime = 0;
    __int64 writeTime = 0;
    GetFileTime( hFile, *(FILETIME*)&createTime, *(FILETIME*)&accessTime, *(FILETIME*)&writeTime );
    

提交回复
热议问题