Home |
Media Transfer Protocol Class Driver Function USBMTPGetDevInfo Function USBMTPGetFileProperty Function USBMTPSetFileProperty |
Function USBMTPGetDevInfoUSBMTPGetDevInfo retrieves information about a connected USB MTP device: typedef struct { DWORD StandardVersion; DWORD MTPVendorExtension; DWORD MTPVersion; DWORD NumStores; const wchar_t * MTPExtensions; const wchar_t * Manufacturer; const wchar_t * Model; const wchar_t * DeviceVersion; const wchar_t * SerialNumber; } USBMTPInfo; int USBMTPGetDevInfo(int Dev, USBMTPInfo * 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 MTP device. This parameter is optional and may be NULL. return valueIf an MTP device is present at the requested index, a value >= RTU_SUCCESS is returned. Otherwise, a negative error code is returned. If this function succeeds and parameter Info is not NULL, *Info is filled with information about the MTP device. Info->NumStores returns the number of storage devices contained on the MTP device. Applications should call USBMTPGetStoreInfo to get additional information about each store. The Unicode strings pointer to by MTPExtensions, Manufacturer, etc 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 USBMTPInfo, please see section 5.1.1 of the USB Media Transfer Protocol Specification, Revision 1.1.
|