Probleme mit GetFileTime_()
Verfasst: 24.02.2005 15:45
hi folks,
irgendwie bekomme ich einfach kein richtiges ergebnis raus, es kommt immer "01.01.1601 00:00:00" raus.
getestet mit PB3.93b3 auf WinXP Pro Sp2.
hat jemand eine idee, woran es liegen könnte oder was ich falsch mache?!
c ya,
nco2k
irgendwie bekomme ich einfach kein richtiges ergebnis raus, es kommt immer "01.01.1601 00:00:00" raus.

Code: Alles auswählen
Procedure.s GetFileTime(File.s)
If FileSize(File) => 0
hFile.l = ReadFile(#PB_Any, File)
If hFile
GetFileTime_(hFile, @Create.FILETIME, @Access.FILETIME, @Write.FILETIME)
FileTimeToSystemTime_(@Create, @SysTime.SYSTEMTIME)
Stamp.s = ""
If SysTime\wDay < 10
Stamp+"0"+Str(SysTime\wDay)
Else
Stamp+Str(SysTime\wDay)
EndIf
Stamp+"."
If SysTime\wMonth < 10
Stamp+"0"+Str(SysTime\wMonth)
Else
Stamp+Str(SysTime\wMonth)
EndIf
Stamp+"."
Stamp+Str(SysTime\wYear)
Stamp+" "
If SysTime\wHour < 10
Stamp+"0"+Str(SysTime\wHour)
Else
Stamp+Str(SysTime\wHour)
EndIf
Stamp+":"
If SysTime\wMinute < 10
Stamp+"0"+Str(SysTime\wMinute)
Else
Stamp+Str(SysTime\wMinute)
EndIf
Stamp+":"
If SysTime\wSecond < 10
Stamp+"0"+Str(SysTime\wSecond)
Else
Stamp+Str(SysTime\wSecond)
EndIf
CloseFile(hFile)
ProcedureReturn Stamp
Else
ProcedureReturn "failed"
EndIf
Else
ProcedureReturn "missing"
EndIf
EndProcedure
Debug GetFileTime("c:\test.txt")
hat jemand eine idee, woran es liegen könnte oder was ich falsch mache?!

c ya,
nco2k