Operating System Versions

From RAD Studio
Jump to: navigation, search

Go Up to Programming for Varying Host Environments


When using operating system APIs or accessing areas of the operating system from an application, there is the possibility that the function, operation, or area might not be available on computers with different operating system versions.

To account for this possibility, you have a few options:

  • Specify in the application system requirements the versions of the operating system on which the application can run. It is the user's responsibility to install and use the application only under compatible operating system versions.
  • Check the version of the operating system as the application is installed. If an incompatible version of the operating system is present, either halt the installation process or at least warn the installer of the problem.
  • Check the operating system version at run time, just prior to executing an operation not applicable to all versions. If an incompatible version of the operating system is present, abort the process and alert the user. Alternately, provide different code to run dependent on different operating system versions.

Note: Some operations are performed differently on various Windows OS versions. Windows Vista or earlier is no longer supported. Use the Windows API function GetVersionEx to determine the Windows version.

See Also