Prev: returning STATUS_FAILED from AddDevice...doesnt make a differe
Next: Strange USB-Audio streaming behaviour of DPC
From: USB Device User USB Device on 25 May 2010 13:34 I have a USB printer and I know its vendor ID and product ID. How can I know it is connected from my C# application?
From: USB Device User on 25 May 2010 14:33 BTW, I am trying to use winapi calls not wmi. "USB Device User" wrote: > I have a USB printer and I know its vendor ID and product ID. How can I know > it is connected from my C# application?
From: Philip Ries [MSFT] on 25 May 2010 14:49 One way is via Setup API (it's a managed API so you will have to PInvoke it). Start with function SetupDiGetClassDevs. USB Device User wrote: > BTW, I am trying to use winapi calls not wmi. > > "USB Device User" wrote: > >> I have a USB printer and I know its vendor ID and product ID. How can I know >> it is connected from my C# application?
From: USB Device User on 25 May 2010 16:14 I tried SetupDi functions. It is easy for HID to get GUID and VID/PID. But for general USB device, how can I get GUID and VID/PID from the api calls? "Philip Ries [MSFT]" wrote: > One way is via Setup API (it's a managed API so you will have to PInvoke > it). Start with function SetupDiGetClassDevs. > > USB Device User wrote: > > BTW, I am trying to use winapi calls not wmi. > > > > "USB Device User" wrote: > > > >> I have a USB printer and I know its vendor ID and product ID. How can I know > >> it is connected from my C# application? > . >
From: Pavel A. on 25 May 2010 17:48
"USB Device User" <USBDeviceUser(a)discussions.microsoft.com> wrote in message news:60FB1C84-C1E3-42EA-9848-9B67D9F0D96F(a)microsoft.com... > I tried SetupDi functions. It is easy for HID to get GUID and VID/PID. But > for general USB device, how can I get GUID and VID/PID from the api calls? Have you tried SetupDiGetClassDevs ? -- pa > "Philip Ries [MSFT]" wrote: > >> One way is via Setup API (it's a managed API so you will have to PInvoke >> it). Start with function SetupDiGetClassDevs. >> >> USB Device User wrote: >> > BTW, I am trying to use winapi calls not wmi. >> > >> > "USB Device User" wrote: >> > >> >> I have a USB printer and I know its vendor ID and product ID. How can >> >> I know >> >> it is connected from my C# application? >> . >> |