| 36 |
|
dwAvailVirtual As Long |
| 37 |
|
End Type |
| 38 |
|
|
| 39 |
+ |
' For uptime |
| 40 |
+ |
Public Declare Function GetTickCount Lib "kernel32" () As Long |
| 41 |
+ |
|
| 42 |
|
Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" _ |
| 43 |
|
(lpVersionInformation As OSVERSIONINFO) As Long |
| 44 |
|
Declare Sub GlobalMemoryStatus Lib "kernel32" (lpBuffer As _ |
| 70 |
|
hGDISegment As Integer |
| 71 |
|
End Type |
| 72 |
|
|
| 73 |
< |
Declare Function getVersion Lib "kernel32" Alias "GetVersion" () As Long |
| 73 |
> |
Declare Function GetVersion Lib "kernel32" () As Long |
| 74 |
|
Declare Function GetWinFlags Lib "kernel32" () As Long |
| 75 |
|
'Enter each of the following Declare statements as one, single line: |
| 76 |
|
Declare Function GetFreeSpace Lib "kernel32" (ByVal wFlags As Integer) As Long |
| 79 |
|
#End If |
| 80 |
|
|
| 81 |
|
|
| 82 |
< |
Public Function getVersion() As String |
| 82 |
> |
Public Function GetVersion() As String |
| 83 |
|
Dim osinfo As OSVERSIONINFO |
| 84 |
|
Dim retvalue As Integer |
| 85 |
|
|
| 91 |
|
Select Case .dwPlatformId |
| 92 |
|
Case 1 |
| 93 |
|
If .dwMinorVersion = 0 Then |
| 94 |
< |
getVersion = "Windows 95" |
| 94 |
> |
GetVersion = "Windows 95" |
| 95 |
|
ElseIf .dwMinorVersion = 10 Then |
| 96 |
< |
getVersion = "Windows 98" |
| 96 |
> |
GetVersion = "Windows 98" |
| 97 |
|
End If |
| 98 |
|
Case 2 |
| 99 |
|
If .dwMajorVersion = 3 Then |
| 100 |
< |
getVersion = "Windows NT 3.51" |
| 100 |
> |
GetVersion = "Windows NT 3.51" |
| 101 |
|
ElseIf .dwMajorVersion = 4 Then |
| 102 |
< |
getVersion = "Windows NT 4.0" |
| 102 |
> |
GetVersion = "Windows NT 4.0" |
| 103 |
|
ElseIf .dwMajorVersion = 5 Then |
| 104 |
< |
getVersion = "Windows 2000" |
| 104 |
> |
GetVersion = "Windows 2000" |
| 105 |
|
End If |
| 106 |
|
Case Else |
| 107 |
< |
getVersion = "Failed" |
| 107 |
> |
GetVersion = "Failed" |
| 108 |
|
End Select |
| 109 |
|
End With |
| 110 |
|
End Function |