Mystery of RegOpenKeyEx

Hi,

How come the function ‘RegOpenKeyEx’ is not documented anywhere in Windows
NT DDK? A number of sample codes use it, but it is not even seen in any of
the header files ! (I wonder how do they compile at all ?)

I basically wanted to access the value of a key
(HKLM\HARDWARE\DEVICEMAP\SERIALCOMM to be specific). Though it seems that I
can use ‘RegOpenKeyEx’, is it safe to use such undocumented funciton ?

Thanking in anticipation,

Regards,
Abhijit


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

RegOpenKeyEx is a user space function documented in the MSDN libraries.
If you want to access the registry from a kernel mode driver, look at
RtlQueryRegistryValues or ZwQueryKey and ZwQueryValueKey.

Don Burn
Windows 2000 Device Driver and Filesystem consulting

----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Friday, October 19, 2001 12:00 AM
Subject: [ntdev] Mystery of RegOpenKeyEx

> Hi,
>
> How come the function ‘RegOpenKeyEx’ is not documented anywhere in Windows
> NT DDK? A number of sample codes use it, but it is not even seen in any of
> the header files ! (I wonder how do they compile at all ?)
>
> I basically wanted to access the value of a key
> (HKLM\HARDWARE\DEVICEMAP\SERIALCOMM to be specific). Though it seems that
I
> can use ‘RegOpenKeyEx’, is it safe to use such undocumented funciton ?
>
> Thanking in anticipation,
>
> Regards,
> Abhijit
>
> —
> You are currently subscribed to ntdev as: xxxxx@acm.org
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Abhijit,

RegOpenKeyEx is a Win32 user-mode function. If you check out the Platform
SDK documentation, you’ll find that it’s quite thorougly documented. It’s
not in the DDK doc’s because you can’t call it from kernel mode.

You need to use a different set of functions to access the Registry from
kernel mode. In particular, take a look at the ZwXxx and RtlXxx groups of
functions in the Kernel-Mode Driver Reference, Part 1.

Regards,
Art Baker

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of
xxxxx@controlnet.co.in
Sent: Friday, October 19, 2001 12:00 AM
To: NT Developers Interest List
Subject: [ntdev] Mystery of RegOpenKeyEx

Hi,

How come the function ‘RegOpenKeyEx’ is not documented anywhere in Windows
NT DDK? A number of sample codes use it, but it is not even seen in any of
the header files ! (I wonder how do they compile at all ?)

I basically wanted to access the value of a key
(HKLM\HARDWARE\DEVICEMAP\SERIALCOMM to be specific). Though it seems that I
can use ‘RegOpenKeyEx’, is it safe to use such undocumented funciton ?

Thanking in anticipation,

Regards,
Abhijit


You are currently subscribed to ntdev as: xxxxx@nfr.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com