I don't think you're suppose to: "Do not cast a pointer to a FILETIME
structure to either a ULARGE_INTEGER*
or __int64*
value because it can cause alignment faults on 64-bit Windows."
Source.
If you really wanted it would be something like:
__int64 to_int64(FILETIME ft)
{
return static_cast<__int64>(ft.dwHighDateTime) << 32 | ft.dwLowDateTime;
}
FILETIME ft = // ...
__int64 t = to_int64(ft);
But something like:
FILETIME ft = // ...
__int64 t = *reinterpet_cast<__int64*>(&ft);
Is bad.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…