RegDisableReflectionKey (advapi32)
Last changed: philipbeber-131.107.0.89

.
Summary
TODO - a short description

C# Signature:

[DllImport("advapi32.dll", SetLastError=true)]
static extern int RegDisableReflectionKey(IntPtr hBase);

VB Signature:

Declare Function RegDisableReflectionKey Lib "advapi32.dll" (hBase As IntPtr) As Int

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

hiveKey = Registry.LocalMachine.OpenSubKey(subKey);

Type type = typeof(RegistryKey);

FieldInfo fi = type.GetField(

"hkey",

BindingFlags.NonPublic | BindingFlags.Instance);

SafeHandle handle = (SafeHandle)fi.GetValue(hiveKey);

IntPtr realHandle = handle.DangerousGetHandle();

int errorCode = RegDisableReflectionKey(handle.DangerousGetHandle());

Documentation