IPortableDeviceService::SendCommand method (portabledeviceapi.h)

The SendCommand method sends a standard WPD command and its parameters to the service.

Syntax

HRESULT SendCommand(
  [in]  const DWORD           dwFlags,
  [in]  IPortableDeviceValues *pParameters,
  [out] IPortableDeviceValues **ppResults
);

Parameters

[in] dwFlags

Not used.

[in] pParameters

The IPortableDeviceValues interface specifying the command parameters.

[out] ppResults

The IPortableDeviceValues interface specifying the command results.

Return value

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

Remarks

This method should only be used to send standard WPD commands to the service. To invoke service methods, use the IPortableDeviceServiceMethods interface.

This method may fail even though it returns S_OK as its HRESULT value. To determine if a command succeeded, an application should always examine the properties referenced by the ppResults parameter:

The object referenced by the pParameters parameter must specify at least these properties:

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

IPortableDeviceService Interface