getOSPlatform

getOSPlatform(version:      String output;
              architecture: Integer output): Integer;

The getOSPlatform method of the Node class returns an integer value that indicates the operating system of the receiver object. The operating system returned by this method can be one of the values listed in the following table.

Constant Operating system is …
OSWindowsEnterprise Microsoft Windows 11, Windows 10, or a Windows Server version
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 following example uses the OSWindows class constant, which is a bit mask that enables you to identify a family of operating systems.

vars
    platform     : Integer;
    version      : String;
    architecture : Integer;
begin
    platform := node.getOSPlatform(version, architecture);
    if platform.bitAnd(Node.OSWindows) <> 0 then
        // operating system is Windows family (Windows 11, Windows 10, 
        // Windows Server 2022, Windows Server 2019, Windows Server 2016, 
        // or Windows Server 2012)
        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, or a Windows Server version
            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;

The architecture parameter indicates internal byte ordering and alignment information relevant to this release of JADE. It is used by the setByteOrderLocal and setByteOrderRemote methods of the Character, Date, Decimal, Integer, Integer64, Real, Time, and TimeStamp primitive types.

The architecture can be one of the values listed in the following table.

Node Class Constant Description
Architecture_32Big_Endian 32‑bit big‑endian internal byte ordering and alignment
Architecture_32Little_Endian 32‑bit little‑endian internal byte ordering and alignment
Architecture_64Big_Endian 64‑bit big‑endian internal byte ordering and alignment
Architecture_64Little_Endian 64‑bit little‑endian internal byte ordering and alignment
Architecture_Gui Binary data passed in the byte order of the GUI system (currently Windows 32‑bit little‑endian)

In JADE thin client mode, this method returns the operating platform of the workstation that is running the JADE logic; that is, the application server. (To return the operating system of the presentation client, use the getOSPlatform method of the Process class.)