Export (0) Print
Expand All

IsOS function

Checks for specified operating systems and operating system features.

Syntax


BOOL IsOS(
  _In_  DWORD dwOS
);

Parameters

dwOS [in]

Type: DWORD

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

NameValueDescription
OS_WINDOWS0The program is running on one of the following versions of Windows:
  • Windows 95
  • Windows 98
  • Windows Me

Equivalent to VER_PLATFORM_WIN32_WINDOWS. Note that none of those systems are supported at this time. OS_WINDOWS returns FALSE on all supported systems.

OS_NT1Always returns TRUE.
OS_WIN95ORGREATER2Always returns FALSE.
OS_NT4ORGREATER3Always returns FALSE.
OS_WIN98ORGREATER5Always returns FALSE.
OS_WIN98_GOLD6Always returns FALSE.
OS_WIN2000ORGREATER7The program is running on Windows 2000 or one of its successors.
OS_WIN2000PRO8Do not use; use OS_PROFESSIONAL.
OS_WIN2000SERVER9Do not use; use OS_SERVER.
OS_WIN2000ADVSERVER10Do not use; use OS_ADVSERVER.
OS_WIN2000DATACENTER11Do not use; use OS_DATACENTER.
OS_WIN2000TERMINAL12The 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. Consider using a more specific value such as OS_TERMINALSERVER, OS_TERMINALREMOTEADMIN, or OS_PERSONALTERMINALSERVER.
OS_EMBEDDED13The program is running on Windows Embedded, any version. Equivalent to VER_SUITE_EMBEDDEDNT.
OS_TERMINALCLIENT14The program is running as a Terminal Server client. Equivalent to GetSystemMetrics(SM_REMOTESESSION).
OS_TERMINALREMOTEADMIN15The program is running on Windows 2000 Terminal Server in the Remote Administration mode or Windows Server 2003 (or one of its successors) in the Remote Desktop for Administration mode (these are the default installation modes). This is equivalent to VER_SUITE_TERMINAL && VER_SUITE_SINGLEUSERTS.
OS_WIN95_GOLD16Always returns FALSE.
OS_MEORGREATER17Always returns FALSE.
OS_XPORGREATER18Always returns FALSE.
OS_HOME19Always returns FALSE.
OS_PROFESSIONAL20The program is running on Windows NT Workstation or Windows 2000 (or one of its successors) Professional. Equivalent to VER_PLATFORM_WIN32_NT && VER_NT_WORKSTATION.
OS_DATACENTER21The program is running on Windows Datacenter Server or Windows Server Datacenter Edition, any version. Equivalent to (VER_NT_SERVER || VER_NT_DOMAIN_CONTROLLER) && VER_SUITE_DATACENTER.
OS_ADVSERVER22The program is running on Windows Advanced Server or Windows Server Enterprise Edition, any version. Equivalent to (VER_NT_SERVER || VER_NT_DOMAIN_CONTROLLER) && VER_SUITE_ENTERPRISE && !VER_SUITE_DATACENTER.
OS_SERVER23The program is running on Windows Server (Standard) or Windows Server Standard Edition, any version. This value will not return true for VER_SUITE_DATACENTER, VER_SUITE_ENTERPRISE, VER_SUITE_SMALLBUSINESS, or VER_SUITE_SMALLBUSINESS_RESTRICTED.
OS_TERMINALSERVER24The 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. This is equivalent to VER_SUITE_TERMINAL && VER_SUITE_SINGLEUSERTS.
OS_PERSONALTERMINALSERVER25The program is running on Windows XP (or one of its successors), Home Edition or Professional. This is equivalent to VER_SUITE_SINGLEUSERTS && !VER_SUITE_TERMINAL.
OS_FASTUSERSWITCHING26Fast user switching is enabled.
OS_WELCOMELOGONUI27Always returns FALSE.
OS_DOMAINMEMBER28The computer is joined to a domain.
OS_ANYSERVER29The program is running on any Windows Server product. Equivalent to VER_NT_SERVER || VER_NT_DOMAIN_CONTROLLER.
OS_WOW643230The program is a 32-bit program running on 64-bit Windows.
OS_WEBSERVER31Always returns FALSE.
OS_SMALLBUSINESSSERVER32The program is running on Microsoft Small Business Server with restrictive client license in force. Equivalent to VER_SUITE_SMALLBUSINESS_RESTRICTED.
OS_TABLETPC33The program is running on Windows XP Tablet PC Edition, or one of its successors.
OS_SERVERADMINUI34The user should be presented with administrator UI. It is possible to have server administrative UI on a non-server machine. This value informs the application that an administrator's profile has roamed to a non-server, and UI should be appropriate to an administrator. Otherwise, the user is shown a mix of administrator and nonadministrator settings.
OS_MEDIACENTER35The program is running on Windows XP Media Center Edition, or one of its successors. Equivalent to GetSystemMetrics(SM_MEDIACENTER).
OS_APPLIANCE36The program is running on Windows Appliance Server.

 

Return value

Type: BOOL

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

Remarks

Values are not provided for Windows Vista and Windows 7. To determine whether either of those operating systems are present, use VerifyVersionInfo.

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.

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.

Requirements

Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server, Windows Server 2003 [desktop apps only]

Header

Shlwapi.h

DLL

Shlwapi.dll (version 5.0 or later)

See also

GetSystemMetrics
GetVersionEx
VerifyVersionInfo

 

 

Community Additions

ADD
Show:
© 2014 Microsoft