#ifndef _WINSTA_H
// rev
/**
* The WinStationShutdownSystem routine shuts down (and optionally restarts) the specified Remote Desktop Session Host (RD Session Host) server.
*
* \param ServerHandle Handle to an RD Session Host server, or specify WINSTATION_CURRENT_SERVER to indicate the server on which your application is running.
* \param ShutdownFlags Indicates the type of shutdown. This parameter can be one of the WSD_* values.
* \return BOOLEAN Nonzero if the function succeeds, or zero otherwise. To get extended error information, call GetLastError.
* \remarks To shut down or restart the system, the calling process must have the SE_SHUTDOWN_NAME privilege enabled.
* \sa https://learn.microsoft.com/en-us/windows/win32/api/wtsapi32/nf-wtsapi32-wtsshutdownsystem
*/
NTSYSAPI
BOOLEAN
NTAPI
WinStationShutdownSystem(
_In_opt_ HANDLE ServerHandle,
_In_ ULONG ShutdownFlags // WSD_*
);
View code on GitHubThis function is a wrapper over an RPC method documented in the [MS-TSTS] specification.