WSMAN_PLUGIN_RECEIVE callback function (wsman.h)

Defines the receive callback for a plug-in. This function is called when an inbound request to receive data is received.

The DLL entry point name must be WSManPluginReceive.

Syntax

WSMAN_PLUGIN_RECEIVE WsmanPluginReceive;

void WsmanPluginReceive(
  WSMAN_PLUGIN_REQUEST *requestDetails,
  DWORD flags,
  PVOID shellContext,
  PVOID commandContext,
  WSMAN_STREAM_ID_SET *streamSet
)
{...}

Parameters

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.

streamSet

A WSMAN_STREAM_ID_SET structure that contains a list of streams for which data is to be received. If this list is empty, all streams that were configured in the shell are implied, which means that all streams are available.

Return value

None

Remarks

Based on the client request, the WSMAN_PLUGIN_RECEIVE callback function can be called against the shell and/or the command. The plug-in calls the WSManPluginReceiveResult method for each piece of data that needs to be sent back to the client. After all of the data has been sent, the plug-in calls WSManPluginOperationComplete to end the stream. All parameters passed in are valid until the Windows Remote Management (WinRM) plug-in calls WSManPluginOperationComplete.

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, Windows Vista with SP1, and Windows Vista with SP2