The WPD_COMMAND_DEVICE_HINTS_GET_CONTENT_LOCATION command retrieves the object IDs of folders that can hold an object of a specified type. This command is provided as a faster way for a client to discover where a device stores specific objects than by brute object enumeration.

Command category



The driver expects the following parameters.

Parameter VarType Description
WPD_PROPERTY_DEVICE_HINTS_CONTENT_TYPE VT_CLSID Required. The object type that the caller wishes to find the container for. For example, to find the top-level folders used to hold images on a digital camera, the caller would submit WPD_CONTENT_TYPE_IMAGE. See Requirements for Objects for a list of object types defined by Windows Portable Devices.

Return Value

The driver should return the following results.

Result VarType Description
WPD_PROPERTY_DEVICE_HINTS_CONTENT_LOCATIONS VT_UNKNOWN Required. An IPortableDevicePropVariantCollection of type VT_LPWSTR values that specify the object IDs of folders containing objects of the type indicated by the calling parameter. If no folders are found, this should be an empty list.The folders indicated by the result may or may not contain objects of other content types. See the WPD_FOLDER_CONTENT_TYPES_ALLOWED property for information on folder restrictions.
WPD_PROPERTY_COMMON_HRESULT VT_ERROR Required. An HRESULT that indicates success or failure of handling 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 is typically only used for driver testing, or if the driver, device, and client are all designed together.

Calling Methods

Can only be called directly using IPortableDevice::SendCommand.