Home |
Media Transfer Protocol Class Driver Function USBMTPGetFileProperty Function USBMTPSetFileProperty |
Function USBMTPGetFilePropertyUSBMTPGetFileProperty retrieves a Property of a file or directory on an MTP device: int USBMTPGetFileProperty(int Dev, USBMTPHandle Handle, WORD PropertyCode, void * Property, UINT Len); ParametersDevIndex of the MTP device. This value should be in range 0 .. RTUSBMTPConfig.MaxDevices - 1. HandleHandle of the file or directory to query. This handle could have been retrieved through functions USBMTPFindFirstFile/USBMTPFindNextFile. 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 file object properties are listed in Appendix B 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 file property is always returned in little endian format. Function FindFile of demo program MTPDemo show how this function is used. Function USBMTPSetFileProperty
|