0

As the title, I want to get iManufacturer number of a webcam, how can I do?

If I install special driver of libusb module to get iManufacturer number, I can get the number, but the webcam became a disk on my computer, and I can not use it as a camera. How can I do without installing the special driver of libusb module?

user3579757
  • 53
  • 2
  • 5

1 Answers1

1

The iManufacturer number is contained in the usb device descriptor. You can get the device descriptor in user mode by using DeviceIoControl with IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX. Take a look at the usbview microsoft example, which does this in its enum code. http://code.msdn.microsoft.com/windowshardware/USBView-sample-application-e3241039

Beed
  • 460
  • 3
  • 10
  • Dear Beed : I could not use the USBView sample application on my computer, I got an error about error C2118 :negative subscript with the usbspec.h, the error appeared in line 92 C_ASSERT(sizeof(USB_DEFAULT_PIPE_SETUP_PACKET) == 8); How can I to solve the error? – user3579757 Jul 01 '14 at 06:08
  • @user3579757 I haven't ran into that problem before with this sample. The sample should compile as is. The error appears to be saying that the USB_DEFAULT_PIPE_SETUP_PACKET struct is not the size that it is expecting. It could be that it is expecting a 32 bit architecture in this case, try building with win32 rather than x64. – Beed Jul 02 '14 at 17:35