SafeNCryptKeyHandle Constructors

Definition

Overloads

SafeNCryptKeyHandle()

Initializes a new instance of the SafeNCryptKeyHandle class.

SafeNCryptKeyHandle(IntPtr, SafeHandle)

Instantiates a new instance of the SafeNCryptKeyHandle class.

SafeNCryptKeyHandle()

Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs

Initializes a new instance of the SafeNCryptKeyHandle class.

C#
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public SafeNCryptKeyHandle();
C#
public SafeNCryptKeyHandle();
Attributes

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6, 7, 8, 9, 10
.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 (package-provided), 2.1 (package-provided)
Windows Desktop 3.0, 3.1, 5

SafeNCryptKeyHandle(IntPtr, SafeHandle)

Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs

Instantiates a new instance of the SafeNCryptKeyHandle class.

C#
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public SafeNCryptKeyHandle(IntPtr handle, System.Runtime.InteropServices.SafeHandle parentHandle);
C#
public SafeNCryptKeyHandle(IntPtr handle, System.Runtime.InteropServices.SafeHandle parentHandle);

Parameters

handle
IntPtr

The pre-existing handle to use. Using Zero returns an invalid handle.

parentHandle
SafeHandle

The parent handle of this SafeNCryptKeyHandle.

Attributes

Exceptions

parentHandle is null.

parentHandle is closed.

-or-

parentHandle is invalid.

Applies to

.NET 10 and other versions
Product Versions
.NET 6, 7, 8, 9, 10
.NET Framework 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided), 2.1 (package-provided)
Windows Desktop 3.0, 3.1, 5