getOSPlatform
getOSPlatform(version: String output; architecture: Integer output): Integer;
The getOSPlatform method of the Process class returns an integer value that indicates the operating system of the process of the receiver.
In JADE thin client mode, this method returns the operating platform of the presentation client. (To return the operating system of the application server workstation that is running the JADE logic, use the getOSPlatform method of the Node class.)
The operating system can be one of the values listed in the following table.
Node Class Constant | Operating system is … |
---|---|
OSWindowsEnterprise | Microsoft Windows 11, Windows 10, Windows Server 2022, Windows Server 2019, Windows Server 2016, or Windows Server 2012 |
OSWindowsHome | Microsoft Windows 98 (not a supported operating system) |
OSWindowsMobile | Microsoft Windows CE (not a supported operating system) |
The version parameter specifies the specific version of the operating system. The architecture parameter is a unique number that indicates internal byte ordering and alignment information relevant to this release of JADE. It is used by the
You can use the OSWindows constant of the Node class, which is a bit mask that enables you to identify a family of operating systems, as shown in the following example.
vars platform : Integer; version : String; architecture : Integer; begin platform := process.getOSPlatform(version, architecture); if platform.bitAnd(Node.OSWindows) <> 0 then // operating system is Windows family (2012 or 2008) if platform = Node.OSWindowsHome then // version is an older version of Windows (unsupported) return 'Windows (unsupported) ' & version; endif; if platform = Node.OSWindowsEnterprise then // version is Windows 11, Windows 10, Windows Server 2022, // Windows Server 2019, Windows Server 2016, or Windows Server 2012 return 'Windows ' & version; endif; if platform = Node.OSWindowsMobile then // version is Windows CE return 'Windows CE (unsupported) ' & version; endif; endif; return '* Unknown platform: ' & platform.String & ' version: ' & version; end;