本帖最后由 繁星 于 2020-5-3 00:59 编辑
help里边现成的不知道对不对Local $HIGHPART = '0x01D61304', _
$LOWPART1 = '0x0581EA62', _
$LOWPART2 = '0x07DCCDBD'
ConsoleWrite('CREATIONTIME:' & _FormatTime($HIGHPART, $LOWPART1) & _
@CRLF & 'LASTMODIFICATIONTIME:' & _FormatTime($HIGHPART, $LOWPART2) & @CRLF)
Func _FormatTime($HIGHPART, $LOWPART)
Local $tagFILETIME = DllStructCreate('struct; dword Lo;dword Hi; endstruct'), _
$tagSYSTEMTIME = DllStructCreate('struct; word Year;word Month;word Dow;word Day;word Hour;word Minute;word Second;word MSeconds; endstruct')
DllStructSetData($tagFILETIME, 'Hi', Dec(StringTrimLeft($HIGHPART, 2)))
DllStructSetData($tagFILETIME, 'Lo', Dec(StringTrimLeft($LOWPART, 2)))
DllCall('kernel32.dll', 'bool', 'FileTimeToSystemTime', 'struct*', $tagFILETIME, 'struct*', $tagSYSTEMTIME)
Return StringFormat("%04d/%02d/%02d %02d:%02d:%02d", _
DllStructGetData($tagSYSTEMTIME, "Year"), _
DllStructGetData($tagSYSTEMTIME, "Month"), _
DllStructGetData($tagSYSTEMTIME, "Day"), _
DllStructGetData($tagSYSTEMTIME, "Hour"), _
DllStructGetData($tagSYSTEMTIME, "Minute"), _
DllStructGetData($tagSYSTEMTIME, "Second"))
EndFunc
|