SafeHandle.IsClosed Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value indicating whether the handle is closed.
public:
property bool IsClosed { bool get(); };
public bool IsClosed { get; }
member this.IsClosed : bool
Public ReadOnly Property IsClosed As Boolean
Property Value
true
if the handle is closed; otherwise, false
.
Remarks
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.
Applies to
Tilbakemeldinger
https://aka.ms/ContentUserFeedback.
Kommer snart: Gjennom 2024 faser vi ut GitHub Issues som tilbakemeldingsmekanisme for innhold, og erstatter det med et nytt system for tilbakemeldinger. Hvis du vil ha mer informasjon, kan du se:Send inn og vis tilbakemelding for