xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

Os_VersionInfo()

Retrieves specific version information about the operating system.

Syntax

Os_VersionInfo() --> aVersionInfo

Return

The function returns a one-dimensional array with five elements holding version information data of the operating system. If the operating system does not provide version information, the return value is NIL.

Description

The elements of the returned array contain the following data

Version information array
ElementDescription
1Major version number
 3 = Windows NT 3.51
 4 = Windows 95, 98, ME or NT 4.0
 5 = Windows 2000, XP, 2003 Server
2Minor version number
 0 = Windows 95
 10 = Windows 98
 90 = Windows Me
 51 = Windows NT 3.51
 0 = Windows NT 4.0
 0 = Windows 2000
 1 = Windows XP
 2 = Windows Server 2000
3Build number of the operating system
4Platform identifier
 0 = VER_PLATFORM_WIN32s
 1 = VER_PLATFORM_WIN32_WINDOWS
 2 = VER_PLATFORM_WIN32_NT
5Service Pack number or additional information about the OS

Info

See also:HB_BuildInfo(), Os(), Os_IsWinNT(), Os_IsWin9X(), Os_IsWin95(), Os_IsWin98(), Os_IsWinME(), Os_IsWinNT351(), Os_IsWinNT4(), Os_IsWinXP(), Os_IsWin2000(), Os_IsWin2003(), Os_IsWtsClient(), Version()
Category: Environment functions , xHarbour extensions
Source:rtl\winos.prg
LIB:xhbdll.lib
DLL:xhbdll.dll

Example

// The example lists the version information of the operating system

   PROCEDURE Main
      AEval( OS_VersionInfo(),  {|x| QOut(x)} )
   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe