语言

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 实例的引用计数,并将句柄返回到同一键。

适用于

另请参阅