SafeNCryptHandle Class
This API supports the product infrastructure and is not intended to be used directly from your code.
Provides a safe handle that can be used by Cryptography Next Generation (CNG) objects.
Assembly: System.Core (in System.Core.dll)
System.Runtime.ConstrainedExecution::CriticalFinalizerObject
System.Runtime.InteropServices::SafeHandle
Microsoft.Win32.SafeHandles::SafeHandleZeroOrMinusOneIsInvalid
Microsoft.Win32.SafeHandles::SafeNCryptHandle
Microsoft.Win32.SafeHandles::SafeNCryptKeyHandle
Microsoft.Win32.SafeHandles::SafeNCryptProviderHandle
Microsoft.Win32.SafeHandles::SafeNCryptSecretHandle
[SecurityCriticalAttribute(SecurityCriticalScope::Everything)] [SecurityPermissionAttribute(SecurityAction::LinkDemand, UnmanagedCode = true)] [HostProtectionAttribute(SecurityAction::LinkDemand, MayLeakOnAbort = true)] [SecurityPermissionAttribute(SecurityAction::InheritanceDemand, UnmanagedCode = true)] public ref class SafeNCryptHandle abstract : SafeHandleZeroOrMinusOneIsInvalid
| Name | Description | |
|---|---|---|
![]() | SafeNCryptHandle() | This API supports the product infrastructure and is not intended to be used directly from your code. Initializes a new instance of the SafeNCryptHandle class. |
| Name | Description | |
|---|---|---|
![]() | IsClosed | Gets a value indicating whether the handle is closed.(Inherited from SafeHandle.) |
![]() | IsInvalid | Gets a value that indicates whether the handle is invalid.(Inherited from SafeHandleZeroOrMinusOneIsInvalid.) |
| Name | Description | |
|---|---|---|
![]() | Close() | Marks the handle for releasing and freeing resources.(Inherited from SafeHandle.) |
![]() | DangerousAddRef(Boolean%) | Manually increments the reference counter on SafeHandle instances.(Inherited from SafeHandle.) |
![]() | DangerousGetHandle() | Returns the value of the handle field.(Inherited from SafeHandle.) |
![]() | DangerousRelease() | Manually decrements the reference counter on a SafeHandle instance.(Inherited from SafeHandle.) |
![]() | Dispose() | Releases all resources used by the SafeHandle class.(Inherited from SafeHandle.) |
![]() | Dispose(Boolean) | Releases the unmanaged resources used by the SafeHandle class specifying whether to perform a normal dispose operation.(Inherited from SafeHandle.) |
![]() | Equals(Object^) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Finalize() | Frees all resources associated with the handle.(Inherited from SafeHandle.) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | MemberwiseClone() | |
![]() | ReleaseHandle() | This API supports the product infrastructure and is not intended to be used directly from your code. Releases a handle used by a Cryptography Next Generation (CNG) object.(Overrides SafeHandle::ReleaseHandle().) |
![]() | ReleaseNativeHandle() | This API supports the product infrastructure and is not intended to be used directly from your code. Releases a native handle used by a Cryptography Next Generation (CNG) object. |
![]() | SetHandle(IntPtr) | Sets the handle to the specified pre-existing handle.(Inherited from SafeHandle.) |
![]() | SetHandleAsInvalid() | Marks a handle as no longer used.(Inherited from SafeHandle.) |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() | handle | Specifies the handle to be wrapped.(Inherited from SafeHandle.) |
for permission to call unmanaged code. Security action: LinkDemand. Associated enumeration: SecurityPermissionFlag::UnmanagedCode
for permission to call unmanaged code. Security action: InheritanceDemand. Associated enumeration: SecurityPermissionFlag::UnmanagedCode
Available since 3.5
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.



