Subscribe to the RSS feed then follow me on twitter at @mrlacey (misc) and @wpug (WPDev news)

Thursday, February 22, 2007

Determining the operating system in Delphi

To determine the version of the operating system in Delphi, use the following constants defined in SysUtils.
  • Win32MajorVersion
  • Win32MinorVersion
  • Win32Platform

Vista (or higher)
Win32MajorVersion = 6

Server 2003
Win32MajorVersion = 5
Win32MinorVersion = 2

XP
Win32MajorVersion = 5
Win32MinorVersion = 1

2000
Win32MajorVersion = 5
Win32MinorVersion = 0

ME
Win32MajorVersion = 4
Win32MinorVersion = 90

98
Win32MajorVersion = 4
Win32MinorVersion = 10

NT4
Win32MajorVersion = 4
Win32MinorVersion = 0
Win32Platform = VER_PLATFORM_WIN32_NT

95
Win32MajorVersion = 4
Win32MinorVersion = 0
Win32Platform = VER_PLATFORM_WIN32_WINDOWS

Are you a Windows Phone, Nokia-X (Android) or Asha developer? If so, you could be getting rewards for the apps you build and the success they achieve by joining the DVLUP program.

No comments:

Post a Comment