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);
        }
 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;
 }