WIN$VERSIONHELPER

Calls a Microsoft Windows Version Helper function.

This routine provides information about the system in addition to the information returned by the ACCEPT FROM SYSTEM-INFO statement.

Version Helper functions is a collection of functions that can indicate the current Windows operating system version and whether it is a Server release. For more information on the different Version Helper functions and their meanings, see your Microsoft Windows documentation.

Note: If Windows introduces a new Helper Function after the release of your current ACUCOBOL-GT runtime, calling the new function fails. In this case, try using the IsWindowsVersionOrGreater Helper Function and providing the required version information as specified in the IsWindowsVersionOrGreater Parameters section below.

Usage

CALL “WIN$VERSIONHELPER”
        USING FUNCTION-NAME, DEST, [ADDITIONAL PARAMETERS]
        GIVING ERROR-CODE

Parameters

FUNCTION-NAME
Specifies the name of the Version Helper function to call. Must be an alphanumeric data item or a literal.
DEST
Holds the return value of the Version Helper function.
Note: In case of error, this data item is not modified from its previous value.
ERROR-CODE
Indicates whether the attempt to call the Version Helper function was successful or not. Possible values are:
0 Success
1 Argument error
2 Invalid function name
3 Current operating system is not Windows
4 Other unexpected error

IsWindowsVersionOrGreater Parameters

The following additional parameters are required when using the IsWindowsVersionOrGreater Helper Function:

MAJOR-VERSION
Specifies the major Windows OS version number used by the Helper Function. Must be a numeric data item or a literal.
MINOR-VERSION
Specifies the minor Windows OS version number used by the Helper Function. Must be a numeric data item or a literal.
SERVICE-PACK-MAJOR
Specifies the major Windows service pack version number used by the Helper Function. Must be a numeric data item or a literal.