Jump to content

WinQueryVersion

From EDM2
Revision as of 18:23, 9 April 2025 by Martini (talk | contribs) (Created page with "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 inf...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.
Operating System Versions
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.
Operating System Versions
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);

Related Functions