From: santapanda on
Hello,

I'm developing a program to find certain devices. In some cases, I'm
looking for the program to find *any* device in the setup class. In other
cases, I only want pay attention to some of the devices in the setup class.
For instance, the Net setup class contains both ethernet adapters as well as
wireless ones; my application is only concerned with Wireless and should
ignore ethernet adapters.

I've run Devcon on a few different machines to determine if there is a rhyme
or reason to how I should isolate some devices. I haven't found a consistent
pattern in instance IDs or hardware IDs that would make it easier to isolate
the desired devices. Am I missing something; does anyone have ideas on how,
once within a collection of devices from a setup class, I can easily pull out
the ones I want?

Thanks!
From: Doron Holan [MSFT] on
device classses are not that interesting, it is a UI grouping feature. if
you are filtering on functionality, device interfaces are closer to what you
want to list. BUT that is still not the entire answer, because many types
of devices may be under the same device interface GUID. for instance, in
the net example you list, wireless NICs and wired NICs expose the same dev
interface

d

--

This posting is provided "AS IS" with no warranties, and confers no rights.


"santapanda" <santapanda(a)discussions.microsoft.com> wrote in message
news:26A394C2-19D8-4512-90EC-60F776708F63(a)microsoft.com...
> Hello,
>
> I'm developing a program to find certain devices. In some cases, I'm
> looking for the program to find *any* device in the setup class. In other
> cases, I only want pay attention to some of the devices in the setup
> class.
> For instance, the Net setup class contains both ethernet adapters as well
> as
> wireless ones; my application is only concerned with Wireless and should
> ignore ethernet adapters.
>
> I've run Devcon on a few different machines to determine if there is a
> rhyme
> or reason to how I should isolate some devices. I haven't found a
> consistent
> pattern in instance IDs or hardware IDs that would make it easier to
> isolate
> the desired devices. Am I missing something; does anyone have ideas on
> how,
> once within a collection of devices from a setup class, I can easily pull
> out
> the ones I want?
>
> Thanks!

From: santapanda on
Thanks Doron for your response,

I had planned on using the interface classes for when I needed to alter the
status of the devices (enable/disable). But where does this leave me with
distinguishing between the different devices in the classes?

"Doron Holan [MSFT]" wrote:

> device classses are not that interesting, it is a UI grouping feature. if
> you are filtering on functionality, device interfaces are closer to what you
> want to list. BUT that is still not the entire answer, because many types
> of devices may be under the same device interface GUID. for instance, in
> the net example you list, wireless NICs and wired NICs expose the same dev
> interface
>
> d
>
> --
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
> "santapanda" <santapanda(a)discussions.microsoft.com> wrote in message
> news:26A394C2-19D8-4512-90EC-60F776708F63(a)microsoft.com...
> > Hello,
> >
> > I'm developing a program to find certain devices. In some cases, I'm
> > looking for the program to find *any* device in the setup class. In other
> > cases, I only want pay attention to some of the devices in the setup
> > class.
> > For instance, the Net setup class contains both ethernet adapters as well
> > as
> > wireless ones; my application is only concerned with Wireless and should
> > ignore ethernet adapters.
> >
> > I've run Devcon on a few different machines to determine if there is a
> > rhyme
> > or reason to how I should isolate some devices. I haven't found a
> > consistent
> > pattern in instance IDs or hardware IDs that would make it easier to
> > isolate
> > the desired devices. Am I missing something; does anyone have ideas on
> > how,
> > once within a collection of devices from a setup class, I can easily pull
> > out
> > the ones I want?
> >
> > Thanks!
>
> .
>
From: Doron Holan [MSFT] on
it is device interface specific how to differentiate. I am pretty sure
there are some netcfg APIs that will help, I don't know what they are though

d

--

This posting is provided "AS IS" with no warranties, and confers no rights.


"santapanda" <santapanda(a)discussions.microsoft.com> wrote in message
news:AF14BB09-2B4D-4705-9D20-B956895D04F9(a)microsoft.com...
> Thanks Doron for your response,
>
> I had planned on using the interface classes for when I needed to alter
> the
> status of the devices (enable/disable). But where does this leave me with
> distinguishing between the different devices in the classes?
>
> "Doron Holan [MSFT]" wrote:
>
>> device classses are not that interesting, it is a UI grouping feature. if
>> you are filtering on functionality, device interfaces are closer to what
>> you
>> want to list. BUT that is still not the entire answer, because many
>> types
>> of devices may be under the same device interface GUID. for instance, in
>> the net example you list, wireless NICs and wired NICs expose the same
>> dev
>> interface
>>
>> d
>>
>> --
>>
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>>
>> "santapanda" <santapanda(a)discussions.microsoft.com> wrote in message
>> news:26A394C2-19D8-4512-90EC-60F776708F63(a)microsoft.com...
>> > Hello,
>> >
>> > I'm developing a program to find certain devices. In some cases, I'm
>> > looking for the program to find *any* device in the setup class. In
>> > other
>> > cases, I only want pay attention to some of the devices in the setup
>> > class.
>> > For instance, the Net setup class contains both ethernet adapters as
>> > well
>> > as
>> > wireless ones; my application is only concerned with Wireless and
>> > should
>> > ignore ethernet adapters.
>> >
>> > I've run Devcon on a few different machines to determine if there is a
>> > rhyme
>> > or reason to how I should isolate some devices. I haven't found a
>> > consistent
>> > pattern in instance IDs or hardware IDs that would make it easier to
>> > isolate
>> > the desired devices. Am I missing something; does anyone have ideas on
>> > how,
>> > once within a collection of devices from a setup class, I can easily
>> > pull
>> > out
>> > the ones I want?
>> >
>> > Thanks!
>>
>> .
>>
From: santapanda on
I found that for network cards, I can use WMI objects available in C#. By
using the System.Management namespace, I can query Win32 classes such as
Win32_NetworkAdapter. That particular class has a property on it,
AdapterType, which differentiates between the different types of network
adapters. Pretty cool!

"Doron Holan [MSFT]" wrote:

> it is device interface specific how to differentiate. I am pretty sure
> there are some netcfg APIs that will help, I don't know what they are though
>
> d
>
> --
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>