Vanara.PInvoke.WTSApi32
5.0.5
Prefix Reserved
dotnet add package Vanara.PInvoke.WTSApi32 --version 5.0.5
NuGet\Install-Package Vanara.PInvoke.WTSApi32 -Version 5.0.5
<PackageReference Include="Vanara.PInvoke.WTSApi32" Version="5.0.5" />
<PackageVersion Include="Vanara.PInvoke.WTSApi32" Version="5.0.5" />
<PackageReference Include="Vanara.PInvoke.WTSApi32" />
paket add Vanara.PInvoke.WTSApi32 --version 5.0.5
#r "nuget: Vanara.PInvoke.WTSApi32, 5.0.5"
#:package Vanara.PInvoke.WTSApi32@5.0.5
#addin nuget:?package=Vanara.PInvoke.WTSApi32&version=5.0.5
#tool nuget:?package=Vanara.PInvoke.WTSApi32&version=5.0.5
![]()
Vanara.PInvoke.WTSApi32 NuGet Package
PInvoke API (methods, structures and constants) imported from Windows WTSApi32.dll.
What is Vanara?
Vanara is a community project that contains various .NET assemblies which have P/Invoke functions, interfaces, enums and structures from Windows libraries. Each assembly is associated with one or a few tightly related libraries.
Issues?
First check if it's already fixed by trying the MyGet build. If you're still running into problems, file an issue.
Included in Vanara.PInvoke.WTSApi32
| Functions | Enumerations | Structures |
|---|---|---|
| WTSActiveSessionExists<br>WTSCloseServer<br>WTSConnectSession<br>WTSCreateListener<br>WTSDisconnectSession<br>WTSEnableChildSessions<br>WTSEnumerateListeners<br>WTSEnumerateProcesses<br>WTSEnumerateProcessesEx<br>WTSEnumerateServers<br>WTSEnumerateSessions<br>WTSEnumerateSessionsEx<br>WTSFreeMemory<br>WTSFreeMemoryEx<br>WTSGetChildSessionId<br>WTSGetListenerSecurity<br>WTSIsChildSessionsEnabled<br>WTSLogoffSession<br>WTSOpenServer<br>WTSOpenServerEx<br>WTSQueryListenerConfig<br>WTSQuerySessionInformation<br>WTSQueryUserConfig<br>WTSQueryUserToken<br>WTSRegisterSessionNotification<br>WTSRegisterSessionNotificationEx<br>WTSSendMessage<br>WTSSetListenerSecurity<br>WTSSetRenderHint<br>WTSSetUserConfig<br>WTSShutdownSystem<br>WTSStartRemoteControlSession<br>WTSStopRemoteControlSession<br>WTSTerminateProcess<br>WTSUnRegisterSessionNotification<br>WTSUnRegisterSessionNotificationEx<br>WTSVirtualChannelClose<br>WTSVirtualChannelOpen<br>WTSVirtualChannelOpenEx<br>WTSVirtualChannelPurgeInput<br>WTSVirtualChannelPurgeOutput<br>WTSVirtualChannelQuery<br>WTSVirtualChannelRead<br>WTSVirtualChannelWrite<br>WTSWaitSystemEvent<br> | REMOTECONTROL_HOTKEY<br>SessionProtocolType<br>WTS_CHANNEL_OPTION<br>WTS_CONFIG_CLASS<br>WTS_CONFIG_SOURCE<br>WTS_CONNECTSTATE_CLASS<br>WTS_EVENT<br>WTS_INFO_CLASS<br>WTS_LISTENER<br>WTS_SESSIONSTATE<br>WTS_TYPE_CLASS<br>WTS_VIRTUAL_CLASS<br>WTS_WSD<br>WTSNotification<br>RENDER_HINT<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> | HWTSSERVER<br>WTS_CLIENT_ADDRESS<br>WTS_CLIENT_DISPLAY<br>WTS_PROCESS_INFO<br>WTS_PROCESS_INFO_EX<br>WTS_SERVER_INFO<br>WTS_SESSION_ADDRESS<br>WTS_SESSION_INFO<br>WTS_SESSION_INFO_1<br>WTSCLIENT<br>WTSCONFIGINFO<br>WTSINFO<br>WTSINFOEX<br>WTSINFOEX_LEVEL<br>WTSINFOEX_LEVEL1<br>WTSLISTENERCONFIG<br>WTSLISTENERNAME<br>WTSUSERCONFIG<br>HVIRTUALCHANNEL<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net8.0-windows7.0 is compatible. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net9.0-windows7.0 is compatible. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net10.0-windows7.0 is compatible. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- Microsoft.Win32.Registry (>= 5.0.0)
- System.Security.AccessControl (>= 6.0.1)
- Vanara.Core (>= 5.0.5)
-
.NETFramework 4.8
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Memory (>= 4.6.3)
- Vanara.Core (>= 5.0.5)
-
.NETStandard 2.0
- Microsoft.Win32.Registry (>= 5.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Memory (>= 4.6.3)
- System.Security.AccessControl (>= 6.0.1)
- Vanara.Core (>= 5.0.5)
-
.NETStandard 2.1
- Microsoft.Win32.Registry (>= 5.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)
- System.Security.AccessControl (>= 6.0.1)
- Vanara.Core (>= 5.0.5)
-
net10.0-windows7.0
- Vanara.Core (>= 5.0.5)
-
net5.0
- Vanara.Core (>= 5.0.5)
-
net6.0
- Vanara.Core (>= 5.0.5)
-
net7.0
- Vanara.Core (>= 5.0.5)
-
net8.0-windows7.0
- Vanara.Core (>= 5.0.5)
-
net9.0-windows7.0
- Vanara.Core (>= 5.0.5)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Vanara.PInvoke.WTSApi32:
| Package | Downloads |
|---|---|
|
Vanara.SystemServices
Classes for system related items derived from the Vanara PInvoke libraries. Includes extensions for Process (privileges and elavation), FileInfo (compression info), Shared Network Drives and Devices, and ServiceController (SetStartType) that pull extended information through native API calls. |
|
|
Vanara.Library
The full set of packages associated with the Vanara PInvoke Libraries. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.0.5 | 247 | 5/16/2026 |
| 5.0.4 | 1,484 | 4/15/2026 |
| 5.0.3 | 330 | 4/9/2026 |
| 5.0.1 | 1,015 | 3/11/2026 |
| 5.0.0 | 2,312 | 1/12/2026 |
| 4.2.1 | 4,202 | 9/9/2025 |
| 4.2.0 | 552 | 8/25/2025 |
| 4.1.6 | 1,542 | 6/20/2025 |
| 4.1.5 | 261 | 6/20/2025 |
| 4.1.4 | 902 | 6/7/2025 |
| 4.1.3 | 1,959 | 4/24/2025 |
| 4.1.2 | 486 | 4/16/2025 |
| 4.1.1 | 2,486 | 3/7/2025 |
| 4.1.0 | 490 | 3/7/2025 |
| 4.0.6 | 630 | 2/24/2025 |
| 4.0.5 | 559 | 2/8/2025 |
| 4.0.4 | 4,806 | 9/13/2024 |
| 4.0.3 | 3,998 | 8/5/2024 |
| 4.0.2 | 581 | 6/24/2024 |
| 4.0.1 | 1,388 | 4/30/2024 |
Currently implements:
Functions
WTSActiveSessionExists WTSCloseServer WTSConnectSession WTSCreateListener WTSDisconnectSession WTSEnableChildSessions WTSEnumerateListeners WTSEnumerateProcesses WTSEnumerateProcessesEx WTSEnumerateServers WTSEnumerateSessions WTSEnumerateSessionsEx WTSFreeMemory WTSFreeMemoryEx WTSGetChildSessionId WTSGetListenerSecurity WTSIsChildSessionsEnabled WTSLogoffSession WTSOpenServer WTSOpenServerEx WTSQueryListenerConfig WTSQuerySessionInformation WTSQueryUserConfig WTSQueryUserToken WTSRegisterSessionNotification WTSRegisterSessionNotificationEx WTSSendMessage WTSSetListenerSecurity WTSSetRenderHint WTSSetUserConfig WTSShutdownSystem WTSStartRemoteControlSession WTSStopRemoteControlSession WTSTerminateProcess WTSUnRegisterSessionNotification WTSUnRegisterSessionNotificationEx WTSVirtualChannelClose WTSVirtualChannelOpen WTSVirtualChannelOpenEx WTSVirtualChannelPurgeInput WTSVirtualChannelPurgeOutput WTSVirtualChannelQuery WTSVirtualChannelRead WTSVirtualChannelWrite WTSWaitSystemEvent
Structures
HVIRTUALCHANNEL HWTSSERVER WTSCLIENT WTSCONFIGINFO WTSINFO WTSINFOEX WTSINFOEX_LEVEL WTSINFOEX_LEVEL1 WTSLISTENERCONFIG WTSLISTENERNAME WTSUSERCONFIG WTS_CLIENT_ADDRESS WTS_CLIENT_DISPLAY WTS_PROCESS_INFO WTS_PROCESS_INFO_EX WTS_SERVER_INFO WTS_SESSION_ADDRESS WTS_SESSION_INFO WTS_SESSION_INFO_1