# GetWinOSVersion

int GetWinOSVersion (unsigned long *majorVersion, unsigned long *minorVersion, unsigned long *build, unsigned long *platform);

## Purpose

This function returns detailed information about the current Windows operating system version. It does not return service pack information. The following table lists the parameter values for the operating systems LabWindows/CVI supports.

Operating System | Major Version | Minor Version | Build | Platform
--- | --- | --- | --- | ---
Windows 2000 | 5 | 0 | <build number> | PLATFORM_WINNT
Windows XP | 5 | 1 | <build number> | PLATFORM_WINNT

## Parameters

Output
Name | Type | Description
majorVersion | unsigned long * | Returns the major version of the operating system. This parameter will contain the integer 5. You may pass NULL for this parameter.
minorVersion | unsigned long * | Returns the minor version of the operating system. On Windows 2000, for example, this parameter will contain the integer 0. On Windows XP, this parameter will contain the integer 1. You may pass NULL for this parameter.
build | unsigned long * | Returns the build number of the operating system. You may pass NULL for this parameter.
platform | unsigned long * | Returns the platform ID of the operating system. This parameter will contain the value PLATFORM_WINNT. You may pass NULL for this parameter. A platform value of PLATFORM_WINNT is used to specify Windows 2000 and Windows XP. If the platform is Windows 2000, the majorVersion will be 5 and the minorVersion will be 0. If the platform is Windows XP, the majorVersion will be 5 and the minorVersion will be 1.

## Return Value

Name | Type | Description
status | integer | The status code that the function returns. 0 indicates success. A negative value indicates an error. This function may return a Programmer's Toolbox or UI Library error code. Call GetGeneralErrorString to obtain a text description of the error.