- Timestamp:
- Aug 21, 2008, 10:55:43 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/ablib/src/Classes/System/OperatingSystem.ab
r497 r601 15 15 End Sub 16 16 17 Sub OperatingSystem( vi As OSVERSIONINFOA)18 pf = vi.dwPlatformId As PlatformID17 Sub OperatingSystem(ByRef vi As OSVERSIONINFOA) 18 pf = ToPlatformID(vi.dwPlatformId) 19 19 ver = New Version(vi.dwMajorVersion, vi.dwMinorVersion, vi.dwBuildNumber) 20 20 sp = New String(vi.szCSDVersion As PCSTR) 21 21 End Sub 22 22 23 Sub OperatingSystem( vi As OSVERSIONINFOW)24 pf = vi.dwPlatformId As PlatformID23 Sub OperatingSystem(ByRef vi As OSVERSIONINFOW) 24 pf = ToPlatformID(vi.dwPlatformId) 25 25 ver = New Version(vi.dwMajorVersion, vi.dwMinorVersion, vi.dwBuildNumber) 26 sp = New String(vi.szCSDVersion As PC STR)26 sp = New String(vi.szCSDVersion As PCWSTR) 27 27 End Sub 28 28 … … 72 72 ver As Version 73 73 sp As String 74 75 Static Function ToPlatformID(platformId As DWord) As PlatformID 76 Select Case platformId 77 Case VER_PLATFORM_WIN32s 78 Return PlatformID.Win32S 79 Case VER_PLATFORM_WIN32_WINDOWS 80 Return PlatformID.Win32Windows 81 Case VER_PLATFORM_WIN32_NT 82 Return PlatformID.Win32NT 83 Case VER_PLATFORM_WIN32_CE 84 Return PlatformID.WinCE 85 Case Else 86 Return PlatformID.Unix 87 End Select 88 End Function 74 89 End Class 75 90
Note:
See TracChangeset
for help on using the changeset viewer.