Home |
Media Transfer Protocol Class Driver Function USBMTPGetFileProperty Function USBMTPSetFileProperty |
Function USBMTPSetFilePropertyUSBMTPSetFileProperty sets a Property of a file or directory on an MTP device: int USBMTPSetFileProperty(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 set. This handle could have been retrieved through functions USBMTPFindFirstFile/USBMTPFindNextFile. PropertyCodeThe code value of the property to be set. PropertyPointer to a buffer containing the property. LenNumber of bytes in the buffer pointed to by parameter Property. return valueIf successful, a value >= RTU_SUCCESS is returned, otherwise, a negative error code. 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 file property passed to this function must be in little endian format. Function Ren of demo program MTPDemo shows how this function is used. Function USBMTPGetFileProperty
|