Job Management Partner 1/Software Distribution Automatic Installation Tool Description and Reference
Description
Acquires major and minor OS versions, and a platform ID.
Format
bool AIT_GetOSType ( integer nMajorVersion, // Major OS version integer nMinorVersion, // Minor OS version integer nPlatformID // Platform ID );
Parameters
nMajorVersion (output)
Specify a variable to receive a major OS version. When the function returns, the variable stores one of the following values.
| Value | Description |
|---|---|
| 4 | Windows 98 |
| 4 | Windows Me |
| 4 | Windows NT 4.0 |
| 5 | Windows 2000 |
| 5 | Windows XP |
| 5 | Windows Server 2003 |
| 6 | Windows Vista |
| 6 | Windows Server 2008 |
| 6 | Windows 7 |
| 6 | Windows Server 2012 |
| 6 | Windows 8 |
nMinorVersion (output)
Specify a variable to receive a minor OS version. When the function returns, the variable stores one of the following values.
| Value | Description |
|---|---|
| 10 | Windows 98 |
| 90 | Windows Me |
| 0 | Windows NT 4.0 |
| 0 | Windows 2000 |
| 1 | Windows XP |
| 2 | Windows Server 2003 |
| 0 | Windows Vista |
| 0 | Windows Server 2008 |
| 1 | Windows Server 2008 R2 |
| 1 | Windows 7 |
| 2 | Windows Server 2012 |
| 2 | Windows 8 |
nPlatformID (output)
Specify a variable to receive an OS platform ID. When the function returns, the variable stores one of the following values.
| Value | Description |
|---|---|
| VER_PLATFORM_WIN32_WINDOWS | Windows Me or Windows 98 |
| VER_PLATFORM_WIN32_NT | Windows 8, Windows Server 2012, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP, Windows 2000, or Windows NT 4.0 |
Return values
The return value is true if the function was executed normally, and false if not. If the function has returned false, you can use AIT_GetLastError to acquire an extended error code. The following gives the error code that AIT_GetLastError may return.
| Extended error number | Error code |
|---|---|
| 122 | ERROR_INSUFFICIENT_BUFFER |
Note
You have to use a desired version number or a greater number to identify what OS version the application is working on. This allows you to test even a new OS version in the same way.
All Rights Reserved. Copyright (C) 2009, 2013, Hitachi, Ltd.
Copyright, patent, trademark, and other intellectual property rights related to the "TMEng.dll" file are owned exclusively by Trend Micro Incorporated.