Detect mobile phone or camera installation

I signed up for notifications using ::RegisterDeviceNotification()( msdn ). After processing some details (message WM_DEVICECHANGE( msdn ), etc.), I have DEV_BROADCAST_DEVICEINTERFACE( msdn ).

How can I find out if the inserted device is a mobile phone or a camera, for example?

I googled Windows Portable Devices ( msdn ). You IPortableDevice::Opencan use DEV_BROADCAST_DEVICEINTERFACE::dbcc_name( msdn ) as an argument . In this case, you can get a list of "supported" device contents ( msdn ), for example:

  • WPD_CONTENT_TYPE_IMAGE
  • WPD_CONTENT_TYPE_AUDIO
  • WPD_CONTENT_TYPE_PLAYLIST
  • WPD_CONTENT_TYPE_VIDEO
  • WPD_CONTENT_TYPE_DOCUMENT
  • WPD_CONTENT_TYPE_UNSPECIFIED
  • WPD_CONTENT_TYPE_FOLDER

But I do not know if the camera supports, for example WPD_CONTENT_TYPE_VIDEO, WPD_CONTENT_TYPE_IMAGEand WPD_CONTENT_TYPE_FOLDER?

- Windows (msdn), ( , , - , ).

+3
1

, , . , , Bluetooth, .. , . , / USB.

USB . . USB-, . . , , .

, . .

, , - USB- . . , .

, , USB- . , , 3 , , 3 , , , .

, . , guid. . , .

Windows7 . HKLM\SYSTEM\CurrentControlSet\Enum\USB... , - . VID_xxxx PID_xxxx - .

USB-, "" , - Windows. , . VID, PID, , .., , , .

, Windows SDK, , , USB-, , XInputDevice . vid pid , : http://msdn.microsoft.com/en-us/library/windows/desktop/ee417014(v=vs.85).aspx

, , , , .

!

0

All Articles