WinQueryVersion
Appearance
This function is included for compatibility purposes only, and its use is not recommended. It is recommended that DosQuerySysInfo (see the Control Program Programming Reference) be used to return the version, the revision level, and the environment of PM.
Syntax
WinQueryVersion(hab)
Parameters
- hab (HAB) - Input
- Anchor-block handle.
Returns
- fSysInf (ULONG) - returns
- System information within which the application is operating.
- This information consists of 4 bytes packed into the ULONG variable as follows:
- Byte 0 (bits 0-7)
- Major version.
- Byte 1 (bits 8-15)
- Minor version.
- Byte 2 (bits 16-23)
- Revision number.
- Byte 3 (bits 24-31)
- Reserved.
Version | Revision | Minor | Major |
---|---|---|---|
OS/2 2.0 | 0 | 00 | 20 |
OS/2 2.1 | 0 | 10 | 20 |
OS/2 2.11 | 0 | 11 | 20 |
OS/2 Warp 3.0 | 0 | 30 | 20 |
Remarks
This function is included for compatibility purposes only, and its use is not recommended. It is recommended that DosQuerySysInfo be used to return the version, the revision level, and the environment of PM.
Parameters
- hab (HAB) - Input
- Anchor-block handle.
- fSysInf (ULONG) - returns
- System information within which the application is operating.
- This information consists of 4 bytes packed into the ULONG variable as follows:
- Byte 0 (bits 0-7)
- Major version.
- Byte 1 (bits 8-15)
- Minor version.
- Byte 2 (bits 16-23)
- Revision number.
- Byte 3 (bits 24-31)
- Reserved.
Version | Revision | Minor | Major |
---|---|---|---|
OS/2 2.0 | 0 | 00 | 20 |
OS/2 2.1 | 0 | 10 | 20 |
OS/2 2.11 | 0 | 11 | 20 |
OS/2 Warp 3.0 | 0 | 30 | 20 |
Example Code
#define INCL_WINWINDOWMGR /* Or use INCL_WIN, INCL_PM, Also in COMMON section */ #include <os2.h> HAB hab; /* Anchor-block handle. */ ULONG fSysInf; /* System information within which the application is operating. */ fSysInf = WinQueryVersion(hab);
This example gets the version of PM that is running.
#define INCL_WINWINDOWMGR #include <OS2.H> #include <stdio.h> HAB hab; ULONG lVer; lVer = WinQueryVersion(hab); printf("PM revision is %d ", lVer);