WSManPluginOperationComplete function (wsman.h)

Reports the completion of an operation by all operation entry points except for the WSManPluginStartup and WSManPluginShutdown methods.

Syntax

DWORD WSManPluginOperationComplete(
  [in]           WSMAN_PLUGIN_REQUEST *requestDetails,
  [in]           DWORD                flags,
  [in]           DWORD                errorCode,
  [in, optional] PCWSTR               extendedInformation
);

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] errorCode

Reports any failure in the operation. If this parameter is not NO_ERROR, any result data that has not been sent will be discarded and the error will be sent.

[in, optional] extendedInformation

Specifies an XML document that contains any extra error information that needs to be reported to the client. This parameter is ignored if errorCode is NO_ERROR. The user interface language of the thread should be used for localization.

Return value

The method returns NO_ERROR if it succeeded; otherwise, it returns an error code. If the operation is unsuccessful, the plug-in must stop the current operation and clean up any data associated with this operation. The requestDetails structure is not valid if an error is received and must not be passed to any other WinRM (WinRM) method.

Remarks

The WSManPluginOperationComplete function is used to report the completion of the data stream for WSManPluginReceive. The WSManPluginShell and WSManPluginCommand operations must also call this function when the shell and command operations are complete.

Requirements

Requirement Value
Minimum supported client Windows 7
Minimum supported server Windows Server 2008 R2
Target Platform Windows
Header wsman.h
Library WsmSvc.lib
DLL WsmSvc.dll
Redistributable Windows Management Framework on Windows Server 2008 with SP2, Windows Vista with SP1, and Windows Vista with SP2