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

I look at WinUsb, and I have a feeling that this is not what I need. Could you point me in the right direction?

I just need to detect the device and send / receive raw data. I used libusb, but some of them are typical for switching to a native API. The only problem: I do not know this name.

+4
source share
2 answers

I have several 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.

-1
source

It looks like you are looking for WPD (Windows Portable Devices). This API is included in the Windows SDK and supports MTP communication with various devices. The WPD team has a very useful blog that contains instructions on how to get started with development.

Edit:

If you need raw USB access, WPD has a set of drivers :

Driver Kit for Windows Portable Devices
The WPD driver set includes the Device Driver Interface (DDI) supported on Windows 7, Windows Vista, and Windows XP. Developers will use this DDI to write drivers for devices that are not yet supported by MTP or the Mass Storage class drivers distributed by Microsoft.

+4
source

All Articles