Home |
Media Transfer Protocol Class Driver Function USBMTPGetDevProperty Function USBMTPGetFileProperty Function USBMTPSetFileProperty |
Function USBMTPGetDevPropertyUSBMTPGetDevProperty retrieves a Property of a connected USB MTP device: int USBMTPGetDevProperty(int Dev, WORD PropertyCode, void * Property, UINT Len); ParametersDevIndex of the MTP device. This value should be in range 0 .. RTUSBMTPConfig.MaxDevices - 1. PropertyCodeThe code value of the requested property. PropertyPointer to a buffer to receive the property. LenNumber of available bytes in the buffer pointed to by parameter Property. return valueIf the function succeeds, the number of bytes of the requested property is returned. Only if this value is <= parameter Len, the property is copied to *Property. On error, a negative error code is returned. Details about all available MTP device properties are listed in Appendix C of the USB Media Transfer Protocol Specification, Revision 1.1. For each property, the PropertyCode and data type is listed. Please note that the returned device property is always returned in little endian format. Functions MTP and Name of demo program MTPDemo show how this function is used.
|