Webcam connected

How can I check if webcam is connected? For example, I power my mainboard while webcam is already connected ( [em]Controller.WebcamConnected[/em] event will not fire). [em]Webcam[/em] class has a property [em]Connected[/em], but to initialize it I need to know some parameters that I do not know:

public Webcam(
	uint id,
	byte interfaceIndex,
	ushort vendorId,
	ushort productId,
	byte portNumber

So, what is the solution?

@ iamin -

Controller.WebcamConnected += Controller_WebcamConnected;
static Webcam webcam= null;
static void Controller_WebcamConnected(object sender, Webcam e)
            Debug.Print("WebCam is detected!");
            webcam= e;

this event should be raised correctly.


  => return a list all usb devices are connected.

Thanks, [em]Controller.GetConnectedDevices[/em] is exactly what I was looking for.