This is part of Family API which allow to create dual-os version of program runs under OS/2 and DOS

Note: This is legacy API call. It is recommended to use 32-bit equivalent

GetVersion

This call returns the OS version number.

Syntax

ver=GetVersion()

Parameters

None

Return Value

rc (WORD) - Windows version for Windows 1.x, 2.x !!!check this!!!

rc (DWORD) - Windows version for Windows 3.x+ !!!check this!!!

Return value description is:

High Byte of Low DWord is a Minor Windows Version

Low Byte of Low DWord is a Major Version

High Byte of High Word is a Major DOS version

Low Byte of High Word is a Minor DOS version

Bindings

C

MASM

Returns WORD

Example

Notes

Actual return value is a Double Word (not documented). High Word is a DOS (or other host platform) version.

High Word was extended in versions later versions of Windows.

Group	Functions
Module manager	GETVERSION GETMODULEHANDLE GETMODULEUSAGE GETMODULEFILENAME GETPROCADDRESS MAKEPROCINSTANCE FREEPROCINSTANCE GETINSTANCEDATA CATCH THROW GETCODEHANDLE LOADLIBRARY
Memory Manager	GlobalAlloc GlobalCompact GlobalDiscard GlobalFree GlobalLock GlobalReAlloc GlobalSize GlobalUnlock GlobalFlags LocalAlloc LocalCompact LocalDiscard LocalFree LocalLock LocalFreeze LocalMelt LocalReAlloc LocalSize LocalUnlock LocalHandleDelta LockData UnlockData LocalFlags
Task Scheduler	GetCurrentTask Yield SetPriority
Resource Manager	AddFontResource RemoveFontResource LoadBitmap LoadCursor LoadIcon LoadMenu LoadString LoadAccelerators FindResource LoadResource AllocResource LockResource FreeResource AccessResource SizeofResource SetResourceHandler
String Translation	AnsiUpper AnsiLower AnsiNext AnsiPrev
Atom Manager	InitAtomTable AddAtom DeleteAtom FindAtom GetAtomName
Windows Initialization File	GetProfileInt GetProfileString WriteProfileString
Debugging	FatalExit
File I/O	OpenFile GetTempFileName GetTempDrive
Registry	RegOpenKey RegCreateKey RegCloseKey RegDeleteKey RegSetValue RegQueryValue RegEnumKey