RegistryKey -> IntPtr

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brian Keating

    RegistryKey -> IntPtr

    Hi there anyone know to the get the native registry Handle from a RegistryKey?

    thanks in advance
  • Shortgrey

    #2
    Re: RegistryKey -> IntPtr

    public static IntPtr GetRegistryHand le(RegistryKey registryKey)
    {
    Type type = registryKey.Get Type();
    FieldInfo fieldInfo = type.GetField(" hkey", BindingFlags.In stance |
    BindingFlags.No nPublic);
    return (IntPtr)fieldIn fo.GetValue(reg istryKey);
    }


    Brian Keating wrote:[color=blue]
    > Hi there anyone know to the get the native registry Handle from a RegistryKey?
    >
    > thanks in advance[/color]

    Comment

    Working...