Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IPortableDeviceService::SendCommand method

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

Syntax


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

Parameters

dwFlags [in]

Not used.

pParameters [in]

The IPortableDeviceValues interface specifying the command parameters.

ppResults [out]

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

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

None supported

Header

PortableDeviceAPI.h

IDL

PortableDeviceAPI.idl

See also

IPortableDeviceService Interface

 

 

Community Additions

Show:
© 2017 Microsoft