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

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

#If Win32 Then
Private iOSVerInfo As OSVERSIONINFO

Public Sub setOSVERSIONINFO(dwOSVersionInfoSize As Long, dwMajorVersion As Long, dwMinorVersion As Long, dwBuildNumber As Long, dwPlatformId As Long, szCSDVersion As String)
    iOSVerInfo.dwOSVersionInfoSize = dwOSVersionInfoSize
    iOSVerInfo.dwMajorVersion = dwMajorVersion
    iOSVerInfo.dwMinorVersion = dwMinorVersion
    iOSVerInfo.dwBuildNumber = dwBuildNumber
    iOSVerInfo.dwPlatformId = dwPlatformId
    iOSVerInfo.szCSDVersion = szCSDVersion
End Sub

Public Sub CopyToOSVERSIONINFO(ByVal lpOSVerInfo As Long)
    Dim vi As OSVERSIONINFO
    
    If lpOSVerInfo = 0 Then RaiseError 5, "dwOSVersionInfo"
    agCopyData iOSVerInfo, ByVal lpOSVerInfo, Len(vi)
End Sub

Public Property Get dwOSVersionInfoSize() As Long
    dwOSVersionInfoSize = iOSVerInfo.dwOSVersionInfoSize
End Property

Public Property Let dwOSVersionInfoSize(vNewValue As Long)
    iOSVerInfo.dwOSVersionInfoSize = vNewValue
End Property

Public Property Get dwMajorVersion() As Long
    dwMajorVersion = iOSVerInfo.dwMajorVersion
End Property

Public Property Let dwMajorVersion(vNewValue As Long)
    iOSVerInfo.dwMajorVersion = vNewValue
End Property

Public Property Get dwMinorVersion() As Long
    dwMinorVersion = iOSVerInfo.dwMinorVersion
End Property

Public Property Let dwMinorVersion(vNewValue As Long)
    iOSVerInfo.dwMinorVersion = vNewValue
End Property

Public Property Get dwBuildNumber() As Long
    dwBuildNumber = iOSVerInfo.dwBuildNumber
End Property

Public Property Let dwBuildNumber(vNewValue As Long)
    iOSVerInfo.dwBuildNumber = vNewValue
End Property

Public Property Get dwPlatformId() As Long
    dwPlatformId = iOSVerInfo.dwPlatformId
End Property

Public Property Let dwPlatformId(vNewValue As Long)
    iOSVerInfo.dwPlatformId = vNewValue
End Property

Public Property Get szCSDVersion() As String
    szCSDVersion = agGetStringFromLPSTR(iOSVerInfo.szCSDVersion)
End Property

Public Property Let szCSDVersion(vNewValue As String)
    iOSVerInfo.szCSDVersion = vNewValue
End Property

#End If ' this class only exists in win32
