WSManSignalShell function (wsman.h)
Sends a control code to an existing command or to the shell itself.
void WSManSignalShell( WSMAN_SHELL_HANDLE shell, WSMAN_COMMAND_HANDLE command, DWORD flags, PCWSTR code, WSMAN_SHELL_ASYNC *async, WSMAN_OPERATION_HANDLE *signalOperation );
Specifies the handle returned by a WSManCreateShell call. This parameter cannot be NULL.
Specifies the command handle returned by a WSManRunShellCommand call. If this value is NULL, the signal code is sent to the shell.
Reserved for future use. Must be set to zero.
Specifies the signal code to send to the command or shell. The following codes are common.
The shell or Command Prompt window was closed.
The signal for CTRL+C was received, and the process was halted.
The signal for CTRL+BREAK was received, and the process was halted.
Defines an asynchronous structure. The asynchronous structure contains an optional user context and a mandatory callback function. See the WSMAN_SHELL_ASYNC structure for more information. This parameter cannot be NULL and should be closed by calling the WSManCloseOperation method.
Defines the operation handle for the signal operation. This handle is returned from a successful call of the function and can be used to asynchronously cancel the signal operation. This handle should be closed by calling the WSManCloseOperation method. This parameter cannot be NULL.
|Minimum supported client||Windows 7|
|Minimum supported server||Windows Server 2008 R2|
|Redistributable||Windows Management Framework on Windows Server 2008 with SP2, Windows Vista with SP1, and Windows Vista with SP2|