語言

SafeEvpPKeyHandle.DuplicateHandle 方法

定義

建立另一個此類實例,該實例具有獨立的生命週期,但追蹤相同資源。

public:
 System::Security::Cryptography::SafeEvpPKeyHandle ^ DuplicateHandle();
public System.Security.Cryptography.SafeEvpPKeyHandle DuplicateHandle();
member this.DuplicateHandle : unit -> System.Security.Cryptography.SafeEvpPKeyHandle
Public Function DuplicateHandle () As SafeEvpPKeyHandle

傳回

另一個此類實例,具有獨立的生命週期,但追蹤相同的資源。

例外狀況

此帳號無效。

備註

在 .NET 8 及更早版本中,此方法會建立一個新的 EVP_PKEY 實例。 在 .NET 9 及以後版本中,此方法會增加現有 EVP_PKEY 實例的參考計數,並回傳同一鍵的句柄。

適用於

另請參閱