![Xcalibur Systems LLC Logo](../icons/logo.png) |
TerminalServicesHelperWTSShutdownSystem Method |
Shuts down (and optionally restarts) the specified Remote Desktop Session Host (RD Session
Host) server.
WTSShutdownSystem function Namespace: Xcalibur.NativeMethods.V2.TerminalServicesAssembly: 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
)
<DllImportAttribute("wtsapi32.dll", SetLastError := true>]
Public Shared Function WTSShutdownSystem (
serverHandle As IntPtr,
flags As Long
) As Integer
public:
[DllImportAttribute(L"wtsapi32.dll", SetLastError = true)]
static int WTSShutdownSystem(
IntPtr serverHandle,
long long flags
)
[<DllImportAttribute("wtsapi32.dll", SetLastError = true)>]
static member WTSShutdownSystem :
serverHandle : IntPtr *
flags : int64 -> int
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
Int32If the function succeeds, the return value is nonzero. To determine whether the
function adjusted all of the specified privileges, call
.
See Also