Prev: How to view a DLL property page in VB6?
Next: VBA code to go to a bookmarked drop down goes to wrong drop down
From: Gary on 5 Jul 2010 20:55 With using VB6, does anyone know how to get the device instance path if you know the device name (or any other way)? This is for a USB device. The device instance path can be seen in the details tab for the properties dialog of the device in device manager. My goal is to launch the properties dialog for this device. Any other way than I am trying to go about it would also be much appreciated. Also, if anyone has any input, I am also trying to learn how to launch the advanced properties dialog of this device. Thanks much for any help. Gary
From: Dee Earley on 6 Jul 2010 04:43 On 06/07/2010 01:55, Gary wrote: > With using VB6, does anyone know how to get the device instance path if > you know the device name (or any other way)? This is for a USB device. > The device instance path can be seen in the details tab for the > properties dialog of the device in device manager. My goal is to launch > the properties dialog for this device. Any other way than I am trying to > go about it would also be much appreciated. Also, if anyone has any > input, I am also trying to learn how to launch the advanced properties > dialog of this device. Thanks much for any help. Again, the Setup API. I have code here but to enumerate HID devices but it's not mine to give away. The main calls are: SetupDiGetClassDevs gets devices of a given class SetupDiEnumDeviceInterfaces and SetupDiGetDeviceInterfaceDetail to get a pathname I then CreateFile on it and call HidD_GetAttributes to get the vendor/device IDs. -- Dee Earley (dee.earley(a)icode.co.uk) i-Catcher Development Team iCode Systems (Replies direct to my email address will be ignored. Please reply to the group.)
From: Karl E. Peterson on 6 Jul 2010 19:02
Gary formulated the question : > With using VB6, does anyone know how to get the device instance path if you > know the device name (or any other way)? This is for a USB device. The device > instance path can be seen in the details tab for the properties dialog of the > device in device manager. My goal is to launch the properties dialog for this > device. Any other way than I am trying to go about it would also be much > appreciated. Also, if anyone has any input, I am also trying to learn how to > launch the advanced properties dialog of this device. Thanks much for any > help. I believe that's handed to you if you monitor the WM_DEVICECHANGE message. Assumes your app is already running, though. Example - http://vb.mvps.org/samples/SysInfo/ -- ..NET: It's About Trust! http://vfred.mvps.org |