Click or drag to resize
Xcalibur Systems LLC Logo

TerminalServicesHelperWTSShutdownSystem Method

Shuts down (and optionally restarts) the specified Remote Desktop Session Host (RD Session Host) server.

WTSShutdownSystem function


Namespace: Xcalibur.NativeMethods.V2.TerminalServices
Assembly: Xcalibur.NativeMethods.V2 (in Xcalibur.NativeMethods.V2.dll) Version: 1.0.1.0
Syntax
[DllImportAttribute("wtsapi32.dll", SetLastError = true)]
public static int WTSShutdownSystem(
	IntPtr serverHandle,
	long flags
)

Parameters

serverHandle  IntPtr
Handle to an RD Session Host server. Specify a handle opened by the function, or specify WTS_CURRENT_SERVER_HANDLE to indicate the RD Session Host server on which your application is running.
flags  Int64
Indicates the type of shutdown using type .

Return Value

Int32
If the function succeeds, the return value is nonzero. To determine whether the function adjusted all of the specified privileges, call .
See Also