Article ID: 92936 - Last Review: December 12, 2003 - Revision: 2.0 How to Get Windows 3.1 Version Number in VB with GetVersionThis article was previously published under Q92936 On This PageSUMMARY
From a Visual Basic program, you can determine the Windows version by
calling the Windows 3.1 API function GetVersion from the Windows kernel
module. The GetVersion function can help your program accommodate
differences in the way API calls operate between different versions of
Windows (such as differences between API parameters or return values).
MORE INFORMATION
The code example below shows how to make the GetVersion function call,
which takes no parameters. The return value is a DWORD (double-word) value,
which translates into a long integer (32-bit value) in Visual Basic.
The GetVersion function changed in Windows 3.1 from a WORD value to a DWORD (double-word) value. The low-order word returns the major (low byte) and minor (high byte) version numbers of Windows, and the high- order word returns the major (high byte) and minor (low byte) versions of MS-DOS, if the function is successful. For details on the GetVersion function, see pp. 469-470 in the "Microsoft Windows Software Development Kit Programmer's Reference Vol. 2: Functions." Step-by-Step Example
REFERENCES
"Microsoft Windows Software Development Kit Programmer's Reference Vol. 2:
Functions", pp. 469-470.
APPLIES TO
| Article Translations
|

Back to the top
