public static IntPtr OpenRegistryKey(RegistryHive hkey, string subkey, ResigtryAccess access)
        {
            IntPtr handle;

            if (Import.RegOpenKeyEx(HkeyToPtr(hkey), subkey, 0, (int)access, out handle) != 0)
            {
                handle = IntPtr.Zero;
            }
            return(handle);
        }
Пример #2
0
 public static IntPtr OpenRegistryKey(RegistryHive hkey, string subkey, ResigtryAccess access) {
     IntPtr handle;
     if(Import.RegOpenKeyEx(HkeyToPtr(hkey), subkey, 0, (int)access, out handle) != 0)
         handle = IntPtr.Zero;
     return handle;
 }