WPD_COMMAND_CAPABILITIES_GET_SUPPORTED_FORMAT_PROPERTIES command

Retrieves all the properties that a device supports for an object of a given format. This command is exposed to create a consistent way to learn all the properties that an object can support, even if an object of the specified format does not yet exist on the device. For example, a device may indicate that it supports JPEG images, but the device could be empty. When an application wants to transfer a JPEG to the device, this command would be sent when the application queries for what properties can be set for JPEG objects.

When the caller is interested in knowing the supported the properties of a particular class of objects (for instance, JPEG files), it is much more efficient to make this request than to call WPD_COMMAND_OBJECT_PROPERTIES_GET_SUPPORTED on each object.

Command category

WPD_CATEGORY_CAPABILITIES

Parameters

ParametersVarTypeDescription

The driver expects the following parameters.

WPD_PROPERTY_CAPABILITIES_FORMAT

VT_CLSID

Required. The format GUID of the format of interest.

Return value

ResultVarTypeDescription

The driver should return the following results.

WPD_PROPERTY_CAPABILITIES_PROPERTY_KEYS

VT_UNKNOWN

Required. An IPortableDeviceKeyCollection that contains the properties that can be supported by objects of the specified format.

WPD_PROPERTY_COMMON_HRESULT

VT_ERROR

Required. An HRESULT that indicates success or failure to carry out the command. If the caller is making an invalid request, the driver should return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED) and is not required to return any other result values. Error codes include Windows Portable Devices error codes or any other appropriate error codes.

WPD_PROPERTY_COMMON_DRIVER_ERROR_CODE

VT_UI4

Optional. A driver-specific error code. This value is typically used by device vendors to improve diagnosis of device errors while using their applications. General purpose applications would ignore it and rely solely on WPD_PROPERTY_COMMON_HRESULT instead.

Calling methods

IPortableDeviceCapabilities::GetSupportedFormatProperties

Requirements

Header

PortableDevice.h

See also

Commands

 

 

Send comments about this topic to Microsoft

Show: