Home |
Media Transfer Protocol Class Driver Function USBMTPGetStoreInfo Function USBMTPGetFileProperty Function USBMTPSetFileProperty |
Function USBMTPGetStoreInfoUSBMTPGetStoreInfo retrieves information about a particular storage device on a USB MTP device: typedef struct { WORD StorageType; WORD FilesystemType; WORD AcccessCapability; DWORD MaxCapacity_Low; DWORD MaxCapacity_High; DWORD FreeSpaceInBytes_Low; DWORD FreeSpaceInBytes_High; DWORD FreeSpaceInObjects; const wchar_t * StorageDescriptor; const wchar_t * VolumeIdentifier; } USBMTPStorage; int USBMTPGetStoreInfo(int Dev, int Store, USBMTPStorage * Info); ParametersDevIndex of the MTP device. This value should be in range 0 .. RTUSBMTPConfig.MaxDevices - 1. InfoPointer to a structure to receive information about the specified storage device. return valueIf successful, a value >= RTU_SUCCESS is returned, otherwise, a negative error code. *Info is filled with information about the MTP device's storage. USBMTPStorage.AcccessCapability may have one of these values:
Please note that for values >= 1, no files may be sent to this storage using USBMTPPutFile. Function USBMTPDeleteFile is support for values 0 and 2 only. USBMTPSetFileProperty can only be used if the value is 0. The Unicode strings pointer to by StorageDescriptor and VolumeIdentifier reside in the internal data buffer of the MTP driver. They will be overwritten by the next MTP driver API call. If these strings are needed long term, they must be copied to some other location. MTP Unicode strings have at most 255 characters. Function MTP of demo program MTPDemo show how this function is used. For further details about the data returned in structure USBMTPStorage, please see section 5.2.2 of the USB Media Transfer Protocol Specification, Revision 1.1.
|