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(
  [in, optional] PVOID operationContext,
                 DWORD flags,
  [in]           WSMAN_ERROR *error,
  [in]           WSMAN_SHELL_HANDLE shell,
  [in, optional] WSMAN_COMMAND_HANDLE command,
  [in, optional] WSMAN_OPERATION_HANDLE operationHandle,
  [in, optional] WSMAN_RESPONSE_DATA *data
)
{...}

Parameters

[in, optional] 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.

[in] error

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

[in] shell

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

[in, optional] command

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

[in, optional] 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.

[in, optional] 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

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