Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Get Device information according to GUID

20 views
Skip to first unread message

Schneider@discussions.microsoft.com Shiri Schneider

unread,
Jul 31, 2008, 7:38:01 AM7/31/08
to
Hello,

I am interested in getting the device information in c#.
I am writing the user mode of a device driver in c# and I have the GUID of
the device.
I would like to get the symbolic name (friendly name) of the device (all the
devices) that belongs to the specific GUID (in c#, not in native).

Thanks,

Shiri.

Tim Roberts

unread,
Aug 2, 2008, 3:21:42 PM8/2/08
to

Your description is a bit confused, but there are certainly samples on the
web showing how to call the SetupDi APIs from managed code.

Why do you shun native code so?
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

Shiri Schneider

unread,
Aug 3, 2008, 12:40:01 AM8/3/08
to
Hi Tim,

Thanks for your response.
I tried using SetupDi functions in my code and i couldn't get the friendly
name of the device properly.
That's why i was intersted in getting the friendly name in other way without
using SetupDi.
Do you know if there us an API in the WMI that expose this options? - if not
do you have an example of using SetupDi in c# to get the friendly name
according to GUID.

Thanks a lot.
Shiri.

Tim Roberts

unread,
Aug 4, 2008, 10:51:06 PM8/4/08
to
Shiri Schneider <ShiriSc...@discussions.microsoft.com> wrote:
>
>Thanks for your response.
>I tried using SetupDi functions in my code and i couldn't get the friendly
>name of the device properly.
>That's why i was intersted in getting the friendly name in other way without
>using SetupDi.

SetupDi is the right way. There are a lot of parameters, and a lot of ways
to get them wrong.

>Do you know if there us an API in the WMI that expose this options? - if not
>do you have an example of using SetupDi in c# to get the friendly name
>according to GUID.

I believe it is exposed through WMI, but I'm not enough of a WMI guy to
know it.

0 new messages