SafeRegistryHandle
Represents a safe handle to the Windows registry.
using System;
namespace Microsoft.Win32.SafeHandles
{
public sealed class SafeRegistryHandle : SafeHandleZeroOrMinusOneIsInvalid
{
public override bool IsInvalid {
get {
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Registry);
}
}
public SafeRegistryHandle(IntPtr preexistingHandle, bool ownsHandle)
: base(false)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Registry);
}
protected override bool ReleaseHandle()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Registry);
}
}
}