Postada em 06/05/2004 00:35 hs
é o seguinte, acabei de colocar um projetinho exemplo aqui no vbWEB, mas vai demorar alguns dias pra ir pro ar então segue abaixo o código. (é que tem as declarações da API)
Private Type FILETIME dwLowDateTime As Long dwHighDateTime As Long End Type Private Type SYSTEMTIME wYear As Integer wMonth As Integer wDayOfWeek As Integer wDay As Integer wHour As Integer wMinute As Integer wSecond As Integer wMilliseconds As Integer End Type Private Declare Function GetFileTime Lib "kernel32" (ByVal hFile As Long, lpCreationTime As FILETIME, lpLastAccessTime As FILETIME, lpLastWriteTime As FILETIME) As Long Private Declare Function FileTimeToSystemTime Lib "kernel32" (lpFileTime As FILETIME, lpSystemTime As SYSTEMTIME) As Long Private Declare Function FileTimeToLocalFileTime Lib "kernel32" (lpFileTime As FILETIME, lpLocalFileTime As FILETIME) As Long Private Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, lpSecurityAttributes As Any, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long
' NO SEU BOTÃO vai ISSO Ou na chamada ...
Dim lHandleArq As Long 'handle do arquivo Dim ftCriacao As FILETIME: Dim FtAcesso As FILETIME: Dim FtModif As FILETIME
'Associa um HANDLE para o arquivo. O PATH está no TEXT1 lHandleArq = CreateFile(Text1.Text, 0, 0, ByVal 0&, 3, 0, ByVal 0&) GetFileTime lHandleArq, ftCriacao, FtAcesso , FtModif
FileTimeToLocalFileTime ftCriacao, ftLcCriacao FileTimeToSystemTime ftLcCriacao, ftSysCriacao
Label2(0) = Format(ftSysCriacao.wDay & "/" & ftSysCriacao.wMonth & "/" & ftSysCriacao.wYear, "dd/mm/yyyy") & " " & Format(ftSysCriacao.wHour & ":" & ftSysCriacao.wMinute, "hh:mm")
[]s Cadu
|