Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > How to get device key (hardware key) path in kernel mode ?

Reply
Thread Tools Display Modes

How to get device key (hardware key) path in kernel mode ?

 
 
Kid
Guest
Posts: n/a

 
      08-15-2010
Hi

I want to get the hardware key path as the instance ID for my WMI event .

Here is some WDM function IoOpenDeviceRegistryKey to open hardware key,
but I can not get the hardware key path name in the tree of
HKLM\SYSTEM\CurrentControlSet\Enum .

Is there some way to get device key (hardware key) path in kernel mode ?

Thank you .
 
Reply With Quote
 
 
 
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      08-15-2010
> Is there some way to get device key (hardware key) path in kernel mode ?

No ways.

For instance IDs, create a device interface on your device and use its string as an ID, this is the classic way.

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com

 
Reply With Quote
 
Kid
Guest
Posts: n/a

 
      08-15-2010
But I found root\wmi Monitor Brightness event use hardware key path based
name as its instance
ID, do you know how can they approach it ?

What do you mean create an interface , which function can I use ?

I would like to use the software key as my instance ID, it is unique too and
we can get it by
WdfDeviceAllocAndQueryProperty function with
property=DevicePropertyDriverKeyName .

How do you think about software key ?


"Maxim S. Shatskih" wrote:

> > Is there some way to get device key (hardware key) path in kernel mode ?

>
> No ways.
>
> For instance IDs, create a device interface on your device and use its string as an ID, this is the classic way.
>
> --
> Maxim S. Shatskih
> Windows DDK MVP
>
> http://www.storagecraft.com
>
> .
>

 
Reply With Quote
 
Pavel A.
Guest
Posts: n/a

 
      08-16-2010
"Kid" <> wrote in message
news:9B3FE313-6F87-4C49-AE09-...
> Hi
>
> I want to get the hardware key path as the instance ID for my WMI event .
>
> Here is some WDM function IoOpenDeviceRegistryKey to open hardware key,
> but I can not get the hardware key path name in the tree of
> HKLM\SYSTEM\CurrentControlSet\Enum .
>
> Is there some way to get device key (hardware key) path in kernel mode ?


To get the key name, use ZwQueryKey( ... KEY_NAME_INFORMATION.. )

-- pa


 
Reply With Quote
 
Doron Holan [MSFT]
Guest
Posts: n/a

 
      08-16-2010
WMI lets you do this without knowing the key by specifying
WMIREG_FLAG_INSTANCE_PDO when you register the instance with wmi

d

"Kid" wrote in message
news:BD52F2E4-99C0-4CD0-AE27-...

But I found root\wmi Monitor Brightness event use hardware key path based
name as its instance
ID, do you know how can they approach it ?

What do you mean create an interface , which function can I use ?

I would like to use the software key as my instance ID, it is unique too and
we can get it by
WdfDeviceAllocAndQueryProperty function with
property=DevicePropertyDriverKeyName .

How do you think about software key ?


"Maxim S. Shatskih" wrote:

> > Is there some way to get device key (hardware key) path in kernel mode ?

>
> No ways.
>
> For instance IDs, create a device interface on your device and use its
> string as an ID, this is the classic way.
>
> --
> Maxim S. Shatskih
> Windows DDK MVP
>
> http://www.storagecraft.com
>
> .
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista32, new driver? & USB Mouse/Keyboard not working Scott J. Stringfellow Windows Vista Hardware 27 04-01-2010 05:22 PM
Game Compatibility BCurrey Windows Vista Games 6 11-29-2007 08:11 PM
Going Golfing but not with Vista markbyrn Windows Vista Games 15 03-08-2007 10:59 AM
americas army stuttering under vista premium ernie Windows Vista Games 0 02-27-2007 10:20 PM
problem in dxdiag Peewee64 Windows Vista Games 0 02-14-2007 09:49 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59