Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

WSMAN_PLUGIN_SIGNAL function

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


VOID WSMAN_PLUGIN_SIGNAL(
  PVOID pluginContext,
  WSMAN_PLUGIN_REQUEST *requestDetails,
  DWORD flags,
  PVOID shellContext,
  PVOID commandContext,
  PCWSTR code
);

Parameters

pluginContext

Specifies the context that was returned by a call to the WSManPluginStartup method. This parameter represents a specific application initialization of a WinRM (WinRM) plug-in.

requestDetails

A pointer to a WSMAN_PLUGIN_REQUEST structure that specifies the resource URI, options, locale, shutdown flag, and handle for the request.

flags

Reserved for future use. Must be zero.

shellContext

Specifies the context that was received when the shell was created.

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.

code

Specifies the signal that is received from the client. The following codes are common.

ValueMeaning
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

This function does not return a value.

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

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Redistributable

Windows Management Framework on Windows Server 2008 with SP2, Windows Server 2003 with SP2, Windows Vista with SP1, Windows Vista with SP2, and Windows XP with SP3

Header

Wsman.h

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.