When the IsOS function is given OS_FASTUSERSWITCHING as its dwOS argument, it tests whether the Fast User Switching feature is both supported and allowed.


All builds have the same test for whether Fast User Switching is supported: either VER_SUITE_TERMINAL or VER_SUITE_SINGLEUSERTS must be set in the wSuiteMask member of the system’s version information.

Whether Fast User Switching is allowed is decided by different methods depending on which SHLWAPI version is asked.

Builds of version 6.0 from Windows Vista, and higher, inquire through the Software Licensing API. Fast User Switching is allowed if the license value TerminalServices-RemoteConnectionManager-AllowMultipleSessions is non-zero. Evaluation is by the SLC function SLGetWindowsInformationDWORD. Version 6.1 imports this function directly, but version 6.0 links to it dynamically and thus also requires that “slc.dll” can be loaded from the system directory and exports the expected function by name.

The original test, in version 6.0 before Windows Vista, is whether the AllowMultipleTSSessions value is non-zero. This value is accepted from either of two keys, listed below in order of decreasing precedence:

Keys HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon
Value AllowMultipleTSSessions
Default 0

If the value is present but has the wrong data type, it evaluates as zero.


The OS_FASTUSERSWITCHING case of the SHLWAPI function IsOS is supported in version 6.0 and higher.