Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
Windows Shell
Shell Reference
Miscellaneous
 IsOS Function

  Switch on low bandwidth view
IsOS Function

Checks for specified operating systems and operating system features.

Syntax

BOOL IsOS(      
    DWORD dwOS );

Parameters

dwOS
[in] A value that specifies which operating system or operating system feature to check for. One of the following values (you cannot combine multiple values).

NameValueSupported OnDescription
OS_WINDOWS0Microsoft Windows 2000/Windows XP/Windows Server 2003The program is not running on Microsoft Windows NT or one of its successors.
OS_NT1Windows 2000/Windows XP/Windows Server 2003The program is running on Windows NT or one of its successors.
OS_WIN95ORGREATER2Windows 2000/Windows XP/Windows Server 2003The program is running on Windows 95 or one of its successors.
OS_NT4ORGREATER3Windows 2000/Windows XP/Windows Server 2003The program is running on Windows NT 4.0 or one of its successors.
OS_WIN2000ORGREATER_ALT4Windows 2000/Windows XP/Windows Server 2003The program is running on Windows 2000 or one of its successors. This value is obsolete. Use OS_WIN2000ORGREATER instead.
OS_WIN98ORGREATER5Windows 2000/Windows XP/Windows Server 2003The program is running on Windows 98 or one of its successors.
OS_WIN98_GOLD6Windows 2000/Windows XP/Windows Server 2003The program is running on Windows 98 exactly.
OS_WIN2000ORGREATER7Windows 2000/Windows XP/Windows Server 2003The program is running on Windows 2000 or one of its successors.
OS_WIN2000PRO8Windows 2000/Windows XP/Windows Server 2003The program is running on Windows 2000 Professional or Windows XP Professional.
OS_WIN2000SERVER9Windows 2000/Windows XP/Windows Server 2003The program is running on Windows 2000 Server (Standard) or Windows Server 2003 Standard Edition.
OS_WIN2000ADVSERVER10Windows 2000/Windows XP/Windows Server 2003The program is running on Windows 2000 Advanced Server or Windows Server 2003 Enterprise Edition.
OS_WIN2000DATACENTER11Windows 2000/Windows XP/Windows Server 2003The program is running on Windows 2000 Datacenter Server or Windows Server 2003 Datacenter Edition.
OS_WIN2000TERMINAL12Windows 2000/Windows XP/Windows Server 2003The program is running on Windows 2000 Terminal Server in either Remote Administration mode or Application Server mode, or Windows Server 2003 (or one of its successors) in Terminal Server mode or Remote Desktop for Administration mode.
OS_EMBEDDED13Windows 2000/Windows XP/Windows Server 2003The program is running on Windows Embedded, any version.
OS_TERMINALCLIENT14Windows 2000/Windows XP/Windows Server 2003The program is running as a Terminal Server client. Equivalent to GetSystemMetrics(SM_REMOTESESSION).
OS_TERMINALREMOTEADMIN15Windows 2000/Windows XP/Windows Server 2003The program is running on Windows 2000 Terminal Server in Remote Administration mode or Windows Server 2003 (or one of its successors) in Remote Desktop for Administration mode.
OS_WIN95_GOLD16Windows 2000/Windows XP/Windows Server 2003Windows 95 exactly.
OS_MEORGREATER17Windows XP/Windows Server 2003The program is running on Windows Millennium Edition (Windows Me) or one of its successors.
OS_XPORGREATER18Windows XP/Windows Server 2003The program is running on Windows XP or one of its successors.
OS_HOME19Windows XP/Windows Server 2003The program is running on the Home Edition of Windows XP or one of its successors.
OS_PROFESSIONAL20Windows XP/Windows Server 2003The program is running on Windows NT Workstation or Windows 2000 (or one of its successors) Professional.
OS_DATACENTER21Windows XP/Windows Server 2003The program is running on Windows Datacenter Server or Windows Server Datacenter Edition, any version.
OS_ADVSERVER22Windows XP/Windows Server 2003The program is running on Windows Advanced Server or Windows Server Enterprise Edition, any version.
OS_SERVER23Windows XP/Windows Server 2003The program is running on Windows Server (Standard) or Windows Server Standard Edition, any version.
OS_TERMINALSERVER24Windows XP/Windows Server 2003The program is running on Windows 2000 Terminal Server in Application Server mode, or on Windows Server 2003 (or one of its successors) in Terminal Server mode.
OS_PERSONALTERMINALSERVER25Windows XP/Windows Server 2003The program is running on Windows XP (or one of its successors), Home Edition or Professional.
OS_FASTUSERSWITCHING26Windows XP/Windows Server 2003Fast user switching is enabled.
OS_WELCOMELOGONUI27Windows XP/Windows Server 2003The Welcome screen is used for logon.
OS_DOMAINMEMBER28Windows XP/Windows Server 2003The computer is joined to a domain.
OS_ANYSERVER29Windows XP/Windows Server 2003The program is running on any Windows Server product.
OS_WOW643230Windows XP/Windows Server 2003The program is a 32-bit program running on Microsoft Win64.
OS_WEBSERVER31Windows XP Service Pack 2 (SP2)/Windows Server 2003 Service Pack 1 (SP1)The program is running on Windows Server 2003, Web Edition, or one of its successors.
OS_SMALLBUSINESSSERVER32Windows XP SP2/Windows Server 2003 SP1The program is running on Microsoft Small Business Server with restrictive client license in force.
OS_TABLETPC33Windows XP SP1/Windows Server 2003The program is running on Windows XP Tablet PC Edition, or one of its successors. Equivalent to GetSystemMetrics(SM_TABLETPC).
OS_SERVERADMINUI34Windows XP SP2/Windows Server 2003The program should bias its defaults towards those suitable for server administrators.
OS_MEDIACENTER35Windows XP SP1/Windows Server 2003The program is running on Windows XP Media Center Edition, or one of its successors. Equivalent to GetSystemMetrics(SM_MEDIACENTER).
OS_APPLIANCE36Windows XP SP2/Windows Server 2003 SP1The program is running on Windows Appliance Server.

Return Value

Returns a nonzero value if the operating system or operating system feature is detected, otherwise FALSE.

Remarks

Note  This function is available through Windows XP and Windows Server 2003. It might be altered or unavailable in subsequent versions of Windows.

In Windows versions earlier than Windows Vista, IsOS was not exported by name or declared in a public header file. To use it in those cases, you must use GetProcAddress and request ordinal 437 from Shlwapi.dll to obtain a function pointer. Under Windows Vista, IsOS is included in Shlwapi.h and this is not necessary.

This function assumes the following operating system lineages.
Win32s->Windows 95->Windows 95 OSR2->Windows 98->Windows 98 SE->Windows Me

Windows NT 3.1->Windows NT 4->Windows 2000->Windows XP->Windows Server 2003

For example, when the table for dwOS specifies "Windows NT 4.0 or one of its successors", this means Windows NT 4.0, Windows 2000, Windows XP, or Windows Server 2003. For the purpose of determining lineage for this function, Windows XP Tablet PC Edition and Windows XP Media Center Edition are considered Windows XP.

When referring to server products, "Windows Server" refers only to the Standard Edition server. If all server products are covered by a particular flag, it is called out explicitly in the table.

Function Information

Minimum DLL Versionshlwapi.dll version 5.0 or later
Custom ImplementationNo
Headershlwapi.h
Import libraryNone
Minimum operating systems Windows 2000, Windows 2000 Server, Windows Server 2003, Windows XP

See Also

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Undocumented parameters      Laurence Parry   |   Edit   |   Show History
While apparently deprecated, this is still in use. 37 appears to be Windows Vista, possibly Vista or above. It may not be the best of ideas to rely on that, though.
Undocumented return value      clackmannan   |   Edit   |   Show History
Most return values seem to be 0 or 1 (as you would expect) but checking for OS_EMBEDDED on a WEPOS+DBCS MUI install returns 64.
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker