Does anyone have any VB.Net code to get the devices listed / enumerated
in the Device Manager listing.
I'm trying to figure out if a device (it's actually a digital camera)
is connected to the computer. When it's plugged in (Firewire), it
shows up in Device Manager under the "Imaging Devices" catagory. When
it's not plugged in, it doesn't show up. When it's plugged in, there
is a registry key that says ReferenceCount = 1, and when it's not
plugged in, it says it = 0. The problem with checking that registry
entry is that it doesn't depend on the camera model -- it depends on
the specific camera. If I plug in a different Fuji camera of the very
same model, it will add a new registry entry with a different big long
number. So I got that working on my first camera, but when I plugged
in the second camera it no longer worked. Apparently it leaves
registry litter around for every camera you've ever plugged in even if
you've since unplugged it.
Is there someway to do it with the WMI? Or is there a simpler way?
Thanks,
Mark H.