SafePipeHandle 類別
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
代表管道控制代碼的包裝函式類別。
public ref class SafePipeHandle sealed : Microsoft::Win32::SafeHandles::SafeHandleZeroOrMinusOneIsInvalid
public ref class SafePipeHandle sealed : System::Runtime::InteropServices::SafeHandle
public sealed class SafePipeHandle : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid
public sealed class SafePipeHandle : System.Runtime.InteropServices.SafeHandle
[System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)]
public sealed class SafePipeHandle : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid
type SafePipeHandle = class
inherit SafeHandleZeroOrMinusOneIsInvalid
type SafePipeHandle = class
inherit SafeHandle
[<System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)>]
type SafePipeHandle = class
inherit SafeHandleZeroOrMinusOneIsInvalid
Public NotInheritable Class SafePipeHandle
Inherits SafeHandleZeroOrMinusOneIsInvalid
Public NotInheritable Class SafePipeHandle
Inherits SafeHandle
- 繼承
- 繼承
- 屬性
此類別衍生自 SafeHandleZeroOrMinusOneIsInvalid。 值為 0 或 -1 是無效的管道句柄。
重要
此型別代表 IDisposable 介面。 當您完成使用型別時,您應該直接或間接處置它。 若要直接處置型別,請呼叫其 try
/catch
區塊中的 Dispose 方法。 若要間接處置它,請使用語言建構函式,例如 using
(在 C# 中) 或 Using
(在 Visual Basic 中)。 如需詳細資訊,請參閱 IDisposable 介面文章中的<使用實作 IDisposable 的物件>一節。
Safe |
建立 SafePipeHandle。 |
Safe |
初始化 SafePipeHandle 類別的新執行個體。 |
handle |
指定要包裝的控制代碼。 (繼承來源 SafeHandle) |
Is |
取得值,指出控制代碼是否已關閉。 (繼承來源 SafeHandle) |
Is |
取得值,表示控制代碼是否無效。 |
Is |
取得值,表示控制代碼是否無效。 (繼承來源 SafeHandleZeroOrMinusOneIsInvalid) |
Close() |
標記要釋出和釋放資源的控制代碼。 (繼承來源 SafeHandle) |
Dangerous |
手動遞增 SafeHandle 執行個體上的參考計數器。 (繼承來源 SafeHandle) |
Dangerous |
傳回 handle 欄位的值。 (繼承來源 SafeHandle) |
Dangerous |
手動遞減 SafeHandle 執行個體上的參考計數器。 (繼承來源 SafeHandle) |
Dispose() |
釋放 SafeHandle 類別所使用的所有資源。 (繼承來源 SafeHandle) |
Dispose(Boolean) |
釋放 SafeHandle 類別所使用的 Unmanaged 資源,指定是否要執行一般處置作業。 (繼承來源 SafeHandle) |
Equals(Object) |
判斷指定的物件是否等於目前的物件。 (繼承來源 Object) |
Get |
做為預設雜湊函式。 (繼承來源 Object) |
Get |
取得目前執行個體的 Type。 (繼承來源 Object) |
Memberwise |
建立目前 Object 的淺層複製。 (繼承來源 Object) |
Release |
在衍生類別中覆寫時,執行釋放控制代碼所需的程式碼。 (繼承來源 SafeHandle) |
Set |
將控制代碼設定為指定的既有控制代碼。 (繼承來源 SafeHandle) |
Set |
將控制代碼標記為不再使用。 (繼承來源 SafeHandle) |
To |
傳回代表目前物件的字串。 (繼承來源 Object) |
產品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |