Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Terminates the specified process on the specified Remote Desktop Session Host (RD Session Host) server.
BOOL WTSTerminateProcess(
[in] HANDLE hServer,
[in] DWORD ProcessId,
[in] DWORD ExitCode
);
[in] hServer
Handle to an RD Session Host server. Specify a handle opened by the WTSOpenServer function, or specify WTS_CURRENT_SERVER_HANDLE to indicate the RD Session Host server on which your application is running.
[in] ProcessId
Specifies the process identifier of the process to terminate.
[in] ExitCode
Specifies the exit code for the terminated process.
If the function succeeds, the return value is a nonzero value.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | wtsapi32.h |
Library | Wtsapi32.lib |
DLL | Wtsapi32.dll |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today