0

For my application I need a list of all MTP/PTP cameras connected to the computer. I am generating a list of all WPD devices on the system with the following code:

...
hr = pPortableDeviceManager->GetDevices(pPnpDeviceIDs, &cPnPDeviceIDs);
if (SUCCEEDED(hr)) {
    for (dwIndex = 0; dwIndex < cPnPDeviceIDs; dwIndex++) {
        ...
    }
}

But this list also includes card readers, scanner and other devices. Is there an easy way to filter out those devices, or do I really need to open each device and fetch the device properties etc. ?

Thomas
  • 514
  • 4
  • 14

1 Answers1

0

see this page WPD Globally Unique Identifiers-GUIDs it Contains a lot of constants and declarations you can search for storage or camera ect

Ahmad
  • 41
  • 1
  • 5