How can my 64-bit driver write to the 32-bit registry view?

In Win32 one can use the KEY_WOW64_32KEY access rights mask to make e.g. RegCreateKeyEx() operate on the 32-bit registry when running as a 64-bit process on windows 64-bit.

But how can I make my 64-bit driver do the same?

I?ve tried using ZwCreateKey() with the KEY_WOW64_32KEY mask, but it don?t work.

Regards
Tobias

xxxxx@diadrom.se wrote:

In Win32 one can use the KEY_WOW64_32KEY access rights mask to make e.g. RegCreateKeyEx() operate on the 32-bit registry when running as a 64-bit process on windows 64-bit.

Remember that’s it not really a separate registry. It’s just a subkey
within the existing registry.

But how can I make my 64-bit driver do the same?

I?ve tried using ZwCreateKey() with the KEY_WOW64_32KEY mask, but it don?t work.

Why not just specify the proper key? For example,
HKEY_LOCAL_MACHINE\Software\Wow6432Node.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks for your answer.

If nothing else works I will use Wow6432Node. It?s just that MSDN says:
?Applications should not use the Wow6432Node key directly, as the implementation may change in future releases.?

Regards
Tobias

xxxxx@diadrom.se wrote:

Thanks for your answer.

If nothing else works I will use Wow6432Node. It’s just that MSDN says:
“Applications should not use the Wow6432Node key directly, as the implementation may change in future releases.”

A driver is not an application. A driver is expected to have a closer
relationship to the implementation than an application does.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

>A driver is not an application. A driver is expected to have a closer

relationship to the implementation than an application does.

That is a good point.

Thank you for your guidance.

/Tobias

In user mode there is a flag bit that indicates the 32-bit registry should
be written. I have always assumed this is reflected in the kernel registry
calls. You might check out the flags field…and note that the
documentation may not have been fully updated.
joe

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@diadrom.se
Sent: Thursday, December 16, 2010 5:04 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] How can my 64-bit driver write to the 32-bit registry
view?

Thanks for your answer.

If nothing else works I will use Wow6432Node. It?s just that MSDN says:
?Applications should not use the Wow6432Node key directly, as the
implementation may change in future releases.?

Regards
Tobias


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.