AllAPI Network - The KPD-Team

Allapi Network

 API List

API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
This Site
 Search Engine
 Contact Form

Donate to


The GetVersion function returns the current version number of Windows and information about the operating system platform.

Declare Function GetVersion Lib "kernel32" Alias "GetVersion" () As Long


Operating Systems Supported
Requires Windows NT 3.1 or later; Requires Windows 95 or later


Return Values
If the function succeeds, the return value is a DWORD value that contains the major and minor version numbers of Windows in the low order word, and information about the operating system platform in the high order word.

For all platforms, the low order word contains the version number of Windows. The low-order byte of this word specifies the major version number, in hexadecimal notation. The high-order byte specifies the minor version (revision) number, in hexadecimal notation.

To distinguish between operating system platforms, use the high order bit and the low order byte, as shown in the following table: Platform
High order bit
Low order byte (major version number)

Windows NT
3 or 4

Windows 95

Win32s with Windows 3.1

For Windows NT and Win32s, the remaining bits in the high order word specify the build number.

For Windows 95 the remaining bits of the high order word are reserved.


Related Functions

VB.NET Example



Copyright © 1998-2007, The Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at