VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "dwSystemTime"
Attribute VB_Creatable = True
Attribute VB_Exposed = True
Option Explicit

' Class dwSystemTime
' Desaware API Toolkit object library
' Copyright (c) 1996 by Desaware Inc.
' All rights reserved

#If Win32 Then
Private iSysTime As SYSTEMTIME

Public Sub SetSysTime(wYear As Integer, wMonth As Integer, wDayOfWeek As Integer, wDay As Integer, wHour As Integer, wMinute As Integer, wSecond As Integer, wMilliseconds As Integer)
Attribute SetSysTime.VB_HelpID = 2343
    iSysTime.wYear = wYear
    iSysTime.wMonth = wMonth
    iSysTime.wDayOfWeek = wDayOfWeek
    iSysTime.wDay = wDay
    iSysTime.wHour = wHour
    iSysTime.wMinute = wMinute
    iSysTime.wSecond = wSecond
    iSysTime.wMilliseconds = wMilliseconds
End Sub

Public Sub CopyToSYSTEMTIME(ByVal lpSysTime As Long)
    Dim st As SYSTEMTIME
    
    If lpSysTime = 0 Then RaiseError 5, "dwSystemTime"
    agCopyData iSysTime, ByVal lpSysTime, Len(st)
End Sub

Public Sub CopyFromSYSTEMTIME(ByVal lpSysTime As Long)
    Dim st As SYSTEMTIME
    
    If lpSysTime = 0 Then RaiseError 5, "dwSystemTime"
    agCopyData ByVal lpSysTime, iSysTime, Len(st)
End Sub

Public Property Get wYear() As Integer
    wYear = iSysTime.wYear
End Property

Public Property Let wYear(vNewValue As Integer)
    iSysTime.wYear = vNewValue
End Property

Public Property Get wMonth() As Integer
    wMonth = iSysTime.wMonth
End Property

Public Property Let wMonth(vNewValue As Integer)
    iSysTime.wMonth = vNewValue
End Property

Public Property Get wDayOfWeek() As Integer
    wDayOfWeek = iSysTime.wDayOfWeek
End Property

Public Property Let wDayOfWeek(vNewValue As Integer)
    iSysTime.wDayOfWeek = vNewValue
End Property

Public Property Get wDay() As Integer
    wDay = iSysTime.wDay
End Property

Public Property Let wDay(vNewValue As Integer)
    iSysTime.wDay = vNewValue
End Property

Public Property Get wHour() As Integer
    wHour = iSysTime.wHour
End Property

Public Property Let wHour(vNewValue As Integer)
    iSysTime.wHour = vNewValue
End Property

Public Property Get wMinute() As Integer
    wMinute = iSysTime.wMinute
End Property

Public Property Let wMinute(vNewValue As Integer)
    iSysTime.wMinute = vNewValue
End Property

Public Property Get wSecond() As Integer
    wSecond = iSysTime.wSecond
End Property

Public Property Let wSecond(vNewValue As Integer)
    iSysTime.wSecond = vNewValue
End Property

Public Property Get wMilliseconds() As Integer
    wMilliseconds = iSysTime.wMilliseconds
End Property

Public Property Let wMilliseconds(vNewValue As Integer)
    iSysTime.wMilliseconds = vNewValue
End Property


#End If ' this class only exists in win32
