VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

'Set the File modified time to Current System Time using GetSystemTimeAsFileTime API

Karthikeyan  (187 Submissions)   Windows API Call/Explanation   Visual Basic 5.0   Unknown Difficulty   Tue 23rd January 2001   Mon 8th February 2021

'Set the File modified time to Current System Time using GetSystemTimeAsFileTime API

API Declarations


Private Const OF_READWRITE = &H2
Private Const OF_REOPEN = &H8000
Private Const OF_SHARE_COMPAT = &H0
Private Const OF_SHARE_DENY_NONE = &H40
Private Const OF_SHARE_DENY_READ = &H30
Private Const OF_SHARE_DENY_WRITE = &H20
Private Const OF_SHARE_EXCLUSIVE = &H10
Private Const OF_VERIFY = &H400
Private Const OF_WRITE = &H1
Private Const OFS_MAXPATHNAME = 128
Private Type OFSTRUCT
cBytes As Byte
fFixedDisk As Byte
nErrCode As Integer
Reserved1 As Integer
Reserved2 As Integer
szPathName(OFS_MAXPATHNAME) As Byte
End Type
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 SetFileTime Lib "kernel32" (ByVal hFile As Long, lpCreationTime As FILETIME, lpLastAccessTime As FILETIME, lpLastWriteTime As FILETIME) As Long
Private Declare Sub GetSystemTimeAsFileTime Lib "kernel32.dll" (lpSystemTimeAsFileTime As FILETIME)
Private Declare Function OpenFile Lib "kernel32" (ByVal lpFileName As String, lpReOpenBuff As OFSTRUCT, ByVal wStyle As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long

Rate 'Set the File modified time to Current System Time using GetSystemTimeAsFileTime API (1(1 Vote))
'Set the File modified time to Current System Time using GetSystemTimeAsFileTime API.bas

'Set the File modified time to Current System Time using GetSystemTimeAsFileTime API Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters