GetOperatingSystemVersion: IOperatingSystemVersion;
The GetOperatingSystemVersion method returns information on the operating system version installed on the computer.
Sub UserProc;
Var
WinApp: IWinApplication;
OSVer: IOperatingSystemVersion;
Begin
WinApp := WinApplication.Instance;
OSVer := WinApp.GetOperatingSystemVersion;
Debug.WriteLine("Major OS version: " + OSVer.MajorVersion.ToString);
Debug.WriteLine("Minor OS version: " + OSVer.MinorVersion.ToString);
Debug.WriteLine("Build number: " + OSVer.BuildNumber.ToString);
Debug.WriteLine("Update name: " + OSVer.CSDVersion);
Debug.WriteLine("Full name of OS: " + OSVer.FullName);
Debug.WriteLine("OS name: " + OSVer.Name);
Debug.WriteLine("OS platform identifier: " + OSVer.PlatformId.ToString);
End Sub UserProc;
On executing the example the console window displays information on the operating system version.
Imports Prognoz.Platform.Interop.Ui;
Sub UserProc();
Var
WinApp: WinApplication = New WinApplicationClass_2();
OSVer: IOperatingSystemVersion;
Begin
OSVer := WinApp.GetOperatingSystemVersion();
System.Diagnostics.Debug.WriteLine("Major OS version: " + OSVer.MajorVersion.ToString());
System.Diagnostics.Debug.WriteLine("Minor OS version: " + OSVer.MinorVersion.ToString());
System.Diagnostics.Debug.WriteLine("Build number: " + OSVer.BuildNumber.ToString());
System.Diagnostics.Debug.WriteLine("Update number: " + OSVer.CSDVersion);
System.Diagnostics.Debug.WriteLine("Full name of OS: " + OSVer.FullName);
System.Diagnostics.Debug.WriteLine("OS name: " + OSVer.Name);
System.Diagnostics.Debug.WriteLine("OS platform identifier: " + OSVer.PlatformId.ToString());
End Sub;
On executing the example the console window displays information on the operating system version.
See also: