Expand Minimize
This topic has not yet been rated - Rate this topic

WTSTerminateProcess function

Terminates the specified process on the specified Remote Desktop Session Host (RD Session Host) server.

Syntax


BOOL WTSTerminateProcess(
  _In_  HANDLE hServer,
  _In_  DWORD ProcessId,
  _In_  DWORD ExitCode
);

Parameters

hServer [in]

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.

ProcessId [in]

Specifies the process identifier of the process to terminate.

ExitCode [in]

Specifies the exit code for the terminated process.

Return value

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.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Wtsapi32.h

Library

Wtsapi32.lib

DLL

Wtsapi32.dll

See also

WTSOpenServer

 

 

Send comments about this topic to Microsoft

Build date: 10/26/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.