简体   繁体   中英

How to up- and download data from an USB device using MTP (Device is not a camera)

I hope you can help me - my task is to up- and download some files to an USB device using MTP.

I found this great example: http://www.codeproject.com/Articles/30726/Transferring-D90-images-with-WIA and now I can transfer some images from my Smartphone to the PC and I was able to enhance this example towards giving me the same device information like in Device Manager (eg ID, Manufacturer, PnP ID String etc.) So far so good. This example uses WIA and I guess it will be only possible to transfer images from the device, isn´t it?

So my question is - What technique is needed to up- and download files to an USB device which is connected via MTP? I spend days with asking google, but I found not a working solution or an working example. Microsoft is not a help in this issue, mostly all links on their page are dead.

I hope here´s someone who can push me into right direction, so that I can solve this one.

Thanks in advance.

I believe the Windows Portable Devices (WPD) API is what you're after.

http://msdn.microsoft.com/en-us/library/dd389005(v=vs.85).aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM