WSMAN_SHELL_COMPLETION_FUNCTION callback function (wsman.h)

The callback function that is called for shell operations, which result in a remote request.

Syntax

WSMAN_SHELL_COMPLETION_FUNCTION WsmanShellCompletionFunction;

void WsmanShellCompletionFunction(
  PVOID operationContext,
  DWORD flags,
  WSMAN_ERROR *error,
  WSMAN_SHELL_HANDLE shell,
  WSMAN_COMMAND_HANDLE command,
  WSMAN_OPERATION_HANDLE operationHandle,
  WSMAN_RESPONSE_DATA *data
)
{...}

Parameters

operationContext

Represents user-defined context passed to the WinRM (WinRM) Client Shell application programming interface (API) .

flags

Specifies one or more flags from the WSManCallbackFlags enumeration.

error

Defines the WSMAN_ERROR structure, which is valid in the callback only.

shell

Specifies the shell handle associated with the user context. The shell handle must be closed by calling the WSManCloseShell method.

command

Specifies the command handle associated with the user context. The command handle must be closed by calling the WSManCloseCommand API method.

operationHandle

Defines the operation handle associated with the user context. The operation handle is valid only for callbacks that are associated with WSManReceiveShellOutput, WSManSendShellInput, and WSManSignalShell calls. This handle must be closed by calling the WSManCloseOperation method.

data

Defines the output data from the command or shell as a result of a WSManReceiveShellOutput call. For more information about the output data, see the WSMAN_RECEIVE_DATA_RESULT structure.

Return value

None

Requirements

   
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