SafeHandleZeroOrMinusOneIsInvalid Class

May 11, 2014

For apps that target Windows Phone OS 7.0 and 7.1, do not use any members of this type in your app. If you do, your code will throw a MethodAccessException. This type is security-critical, which restricts it to internal use by the .NET Framework for Windows Phone class library.
[SECURITY CRITICAL]

Provides a base class for Win32 safe handle implementations in which the value of either 0 or -1 indicates an invalid handle.

System.Object
  System.Runtime.InteropServices.SafeHandle
    Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid
      Microsoft.Win32.SafeHandles.SafeWaitHandle

Namespace:  Microsoft.Win32.SafeHandles
Assembly:  mscorlib (in mscorlib.dll)

[SecurityCriticalAttribute]
public abstract class SafeHandleZeroOrMinusOneIsInvalid : SafeHandle

The SafeHandleZeroOrMinusOneIsInvalid type exposes the following members.

  NameDescription
Protected methodSafeHandleZeroOrMinusOneIsInvalidInitializes a new instance of the SafeHandleZeroOrMinusOneIsInvalid class, specifying whether the handle is to be reliably released.
Top

  NameDescription
Public propertyIsClosedGets a value indicating whether the handle is closed. (Inherited from SafeHandle.)
Public propertyIsInvalidGets a value that indicates whether the handle is invalid. (Overrides SafeHandle.IsInvalid.)
Top

  NameDescription
Public methodCloseSecurity Critical. Marks the handle for releasing and freeing resources. (Inherited from SafeHandle.)
Public methodDangerousAddRefSecurity Critical. Manually increments the reference counter on SafeHandle instances. (Inherited from SafeHandle.)
Public methodDangerousGetHandleReturns the value of the handle field. (Inherited from SafeHandle.)
Public methodDangerousReleaseSecurity Critical. Manually decrements the reference counter on a SafeHandle instance. (Inherited from SafeHandle.)
Public methodDispose()Releases all resources used by the SafeHandle class. (Inherited from SafeHandle.)
Protected methodDispose(Boolean)Security Critical. Releases the unmanaged resources used by the SafeHandle class specifying whether to perform a normal dispose operation. (Inherited from SafeHandle.)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodReleaseHandleWhen overridden in a derived class, executes the code required to free the handle. (Inherited from SafeHandle.)
Protected methodSetHandleSets the handle to the specified pre-existing handle. (Inherited from SafeHandle.)
Public methodSetHandleAsInvalidSecurity Critical. Marks a handle as no longer used. (Inherited from SafeHandle.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Protected fieldhandleSpecifies the handle to be wrapped. (Inherited from SafeHandle.)
Top

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Show:
© 2014 Microsoft