﻿<?xml version="1.0" encoding="utf-8"?><Type Name="SafeHandleZeroOrMinusOneIsInvalid" FullName="Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid"><TypeSignature Language="C#" Value="public abstract class SafeHandleZeroOrMinusOneIsInvalid : System.Runtime.InteropServices.SafeHandle" /><TypeSignature Language="ILAsm" Value=".class public auto ansi abstract beforefieldinit SafeHandleZeroOrMinusOneIsInvalid extends System.Runtime.InteropServices.SafeHandle implements class System.IDisposable" /><AssemblyInfo><AssemblyName>mscorlib</AssemblyName><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Base><BaseTypeName>System.Runtime.InteropServices.SafeHandle</BaseTypeName></Base><Interfaces /><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This class derives from the <see cref="T:System.Runtime.InteropServices.SafeHandle" /> class. It describes the format of an invalid handle. For example, some handles use -1 as an invalid handle value, while others use 0. Further derivations of this class (for example, file or registry handles) can specialize this further. See the <see cref="T:Microsoft.Win32.SafeHandles.SafeFileHandle" /> class for an example of a class that derives from <see cref="T:Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid" />.</para><para>Use the <see cref="T:Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid" /> class whenever you need to safely wrap an unmanaged resource that does not have an existing managed wrapper.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Provides a base class for Win32 safe handle implementations in which the value of either 0 or -1 indicates an invalid handle.</para></summary></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="C#" Value="protected SafeHandleZeroOrMinusOneIsInvalid (bool ownsHandle);" /><MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor(bool ownsHandle) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)</AttributeName></Attribute></Attributes><Parameters><Parameter Name="ownsHandle" Type="System.Boolean" /></Parameters><Docs><remarks>If <paramref name="ownsHandle" /> is set to true, the handle will be disposed at finalization time.</remarks><since version=".NET 2.0" /><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid" /> class, specifying whether the handle is to be reliably released. </para></summary><param name="ownsHandle"><attribution license="cc4" from="Microsoft" modified="false" />true to reliably release the handle during the finalization phase; false to prevent reliable release (not recommended).</param></Docs></Member><Member MemberName="IsInvalid"><MemberSignature Language="C#" Value="public override bool IsInvalid { get; }" /><MemberSignature Language="ILAsm" Value=".property instance bool IsInvalid" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Docs><value>To be added.</value><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The common language runtime uses this property to determine whether critical finalization is required.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets a value that indicates whether the handle is invalid.</para></summary></Docs></Member></Members></Type>