开发者

What is the native way to communicate with a standard USB PTP/MTP camera on Windows?

I'm looking at WinUsb, and I have a feeling it's not what I need. Could you please point me in the right direction?

I just need to detect device and send/receive raw data. I used to use 开发者_运维知识库libusb, but some of it's characteristic force me to switch to a native API. The only problem is I don't know it's name.


It sounds like you're looking for WPD (Windows Portable Devices). This API is included in the Windows SDK and supports MTP communication with a variety of devices. The WPD team have a very useful blog, which contains instructions on how to get started with development.

Edit:

If you want raw USB access then WPD has a driver kit available:

Windows Portable Devices Driver Kit
The WPD Driver Kit includes a Device Driver Interface (DDI) that is supported in Windows 7, Windows Vista, and Windows XP operating Systems. Developers will use this DDI to write drivers for devices that are not already supported by the MTP or Mass Storage class drivers that Microsoft distributes.


I've got some answers here: https://sourceforge.net/mailarchive/forum.php?thread_name=HKEDKEEGPPEOHLHHEPEDKEOADBAA.michael.plante%40gmail.com&forum_name=libusb-win32-devel

In a few words - WPD for Windows Vista/7 and ReadFile/WriteFile for XP.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜