By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,412 Members | 993 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,412 IT Pros & Developers. It's quick & easy.

RegistryKey -> IntPtr

P: n/a
Hi there anyone know to the get the native registry Handle from a RegistryKey?

thanks in advance
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
public static IntPtr GetRegistryHandle(RegistryKey registryKey)
{
Type type = registryKey.GetType();
FieldInfo fieldInfo = type.GetField("hkey", BindingFlags.Instance |
BindingFlags.NonPublic);
return (IntPtr)fieldInfo.GetValue(registryKey);
}
Brian Keating wrote:
Hi there anyone know to the get the native registry Handle from a RegistryKey?

thanks in advance

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.