void WriteValue(string name, byte[] value, RegistryValueKind valueType) { if (this.hKey != null && !this.hKey.IsInvalid) { int ret = SafeNativeMethods.ClusterRegSetValue(this.hKey, name, valueType, value, (uint)value.Length); if (ret == SafeNativeMethods.ERROR_SUCCESS) { return; } } throw registryExceptionHelper.CreateRegistryWriteException(name, null); }