IPortableDeviceServiceMethods::Invoke method (portabledeviceapi.h)

The Invoke method synchronously invokes a method.

Syntax

HRESULT Invoke(
  [in]      REFGUID               Method,
  [in]      IPortableDeviceValues *pParameters,
  [in, out] IPortableDeviceValues **ppResults
);

Parameters

[in] Method

The method to invoke.

[in] pParameters

A pointer to an IPortableDeviceValues interface that contains the parameters of the invoked method, or NULL to indicate that the method has no parameters.

[in, out] ppResults

The address of a pointer to an IPortableDeviceValues interface that receives the method results, or NULL to ignore the method results.

Return value

If the method succeeds, it returns S_OK. Any other HRESULT value indicates that the call failed.

Remarks

The method invocation is synchronous and will not return until the method has completed. For long-running methods, your application should call the InvokeAsync method instead.

Examples

For an example of how to use this method, see Invoking Service Methods

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps | UWP apps]
Minimum supported server None supported
Target Platform Windows
Header portabledeviceapi.h

See also

IPortableDeviceServiceMethods Interface

Invoking Service Methods