WSMAN_PLUGIN_SIGNAL callback function (wsman.h)
Defines the signal callback for a plug-in. This function is called when an inbound signal is received from a client call.
The DLL entry point name for this method must be WSManPluginSignal.
Syntax
WSMAN_PLUGIN_SIGNAL WsmanPluginSignal;
void WsmanPluginSignal(
[in] WSMAN_PLUGIN_REQUEST *requestDetails,
[in] DWORD flags,
[in] PVOID shellContext,
[in, optional] PVOID commandContext,
[in] PCWSTR code
)
{...}
Parameters
[in] requestDetails
A pointer to a WSMAN_PLUGIN_REQUEST structure that specifies the resource URI, options, locale, shutdown flag, and handle for the request.
[in] flags
Reserved for future use. Must be zero.
[in] shellContext
Specifies the context that was received when the shell was created.
[in, optional] commandContext
If this request is aimed at a command and not a shell, this is the context returned from the winrm create operation; otherwise, this parameter is NULL.
[in] code
Specifies the signal that is received from the client. The following codes are common.
WSMAN_SIGNAL_SHELL_CODE_TERMINATE
The shell or Command Prompt window was closed. The plug-in should call the WSManPluginOperationComplete function.
WSMAN_SIGNAL_SHELL_CODE_CTRL_C
The signal for CTRL+C was received, and the process was halted. The plug-in should call the WSManPluginOperationComplete function.
WSMAN_SIGNAL_SHELL_CODE_CTRL_BREAK
The signal for CTRL+BREAK was received, and the process was halted. The plug-in should call the WSManPluginOperationComplete function.
Return value
None
Remarks
A signal can be received for processing a CTRL+C sequence or one of many other types of custom signals. The callback is called once for each signal that is received. The plug-in determines which signals cause commands and/or shells to be shut down. Because signals are shell-specific, the plug-in must initiate the shutdown by calling the WSManPluginOperationComplete method. For each call, the plug-in should call WSManPluginOperationComplete to acknowledge receipt and to allow the next signal to be received.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 |
Minimum supported server | Windows Server 2008 R2 |
Target Platform | Windows |
Header | wsman.h |
Redistributable | Windows Management Framework on Windows Server 2008 with SP2, and Windows Vista with SP2 |