SafeHandle.IsClosed Property
.NET Framework 3.0
Gets a value indicating whether the handle is closed.
Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly: mscorlib (in mscorlib.dll)
The IsClosed method returns a value indicating whether the SafeHandle object's handle is no longer associated with a native resource. This differs from the definition of the IsInvalid property, which computes whether a given handle is always considered invalid. The IsClosed method returns a true value in the following cases:
-
The SetHandleAsInvalid method was called.
-
The Dispose method or Close method was called and there are no references to the SafeHandle object on other threads.
- SecurityPermission for permission to call unmanaged code. Security action: LinkDemand. Associated enumeration: SecurityPermissionFlag.UnmanagedCode
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: