IWSManSession::Invoke method (wsmandisp.h)

Invokes a method and returns the results of the method call.

Syntax

HRESULT Invoke(
  [in]           BSTR    actionUri,
  [in]           VARIANT resourceUri,
  [in]           BSTR    parameters,
  [in, optional] long    flags,
  [out]          BSTR    *result
);

Parameters

[in] actionUri

The URI of the method to invoke.

[in] resourceUri

The identifier of the resource to invoke a method.

This parameter can contain one of the following:

[in] parameters

An XML representation of the input for the method. This string must be supplied or this method will fail.

[in, optional] flags

Reserved for future use. Must be set to 0.

[out] result

An XML representation of the method output.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header wsmandisp.h
Library WSManDisp.tlb
DLL WSMAuto.dll

See also

IWSManSession

Session.Invoke