Set System Time using SetSystemTime API
Set System Time using SetSystemTime API
API Declarations
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 SetSystemTime Lib "kernel32.dll" (lpSystemTime As SYSTEMTIME) As Long
Rate Set System Time using SetSystemTime API
(1(1 Vote))
' Set the system time to
' March 26, 1987 20:45:00 Greenwich Time
Dim stime As SYSTEMTIME
Dim rval As Long
stime.wHour = 20
stime.wMinute = 45
stime.wSecond = 0
stime.wMilliseconds = 0
stime.wDay = 26
stime.wMonth = 3
stime.wYear = 1987
' Set time and date.
rval = SetSystemTime(stime)
End
End Sub
Set System Time using SetSystemTime API Comments
No comments yet — be the first to post one!
Post a Comment