Option Explicit
Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OVSERSIONINFOEX) As Long
Private Type OVSERSIONINFOEX dwOVSersionInfoSize As Long dwMajorVersion As Long dwMinorVersion As Long dwBuildNumber As Long dwPlatformId As Long szCSDVersion As String * 128 wServicePackMajor As Integer wServicePackMinor As Integer wSuiteMask As Integer wProductType As Byte wReserved As ByteEnd Type
Public Function IsVistaSystem() As Boolean Dim OVS As OVSERSIONINFOEX OVS.dwOVSersionInfoSize = Len(OVS) If GetVersionEx(OVS) = 1 Then If OVS.dwPlatformId = 2 And OVS.dwMajorVersion >= 6 And OVS.dwMinorVersion >= 0 Then IsVistaSystem = True End If End IfEnd Function
转载于:https://www.cnblogs.com/forads/archive/2009/12/13/2161133.html
相关资源:JAVA上百实例源码以及开源项目源代码