ContentsIndexPreviousNext

WIN$VERSION Routine

The WIN$VERSION routine returns version information for Windows and Windows NT host platforms. It provides more information about the system than is returned by the ACCEPT FROM SYSTEM-INFO statement.

Usage

CALL "WIN$VERSION" USING WINVERSION-DATA

Parameter

WINVERSION-DATA Group item as follows:

01  WINVERSION-DATA.
    03  WIN-MAJOR-VERSION     PIC X COMP-X.
    03  WIN-MINOR-VERSION     PIC X COMP-X.
    03  WIN-PLATFORM          PIC X COMP-X.
        88  PLATFORM-WIN-31   VALUE 1.
        88  PLATFORM-WIN-95   VALUE 2.
        88  PLATFORM-WIN-9X   VALUE 2.
        88  PLATFORM-WIN-NT   VALUE 3.
    03  WIN-WORDSIZE          PIC X COMP-X.
        88  WIN-WORDSIZE-16   VALUE 1.
        88  WIN-WORDSIZE-32   VALUE 2.

WINVERSION-DATA is found in the COPY library "winvers.def".

Comments

Upon return from WIN$VERSION, all of the data elements contained in WINVERSION-DATA are filled in. If you call WIN$VERSION and the host machine is not a Windows or Windows NT system, the fields are set to zero.

The WINVERSION-DATA fields have the following meaning:

WIN-MAJOR-VERSION The major version number reported by Windows. For example, Windows NT 3.5 puts a "3" here.

WIN-MINOR-VERSION The minor version number reported by Windows. For example, Windows NT 3.5 puts a "5" here.

WIN-PLATFORM Provides a general description of the host system. If the host is Windows NT/Windows 2000, the value is set to PLATFORM-WIN-NT. If the host is Windows 95, the value is set to PLATFORM-WIN-95. For Windows 98, the value is set to PLATFORM-WIN-9X. WIN$VERSION returns the same value for Windows 98 and Windows 95 in the WIN-PLATFORM field. You can distinguish between these two platforms by the Windows version number. Both Windows 95 and Windows 98 return "4" as the major version number. Windows 95, however, returns "0" as the minor version number while Windows 98 returns "1".

WIN-WORDSIZE This item is set to WIN-WORDSIZE-32 for a 32-bit runtime.