SafeCTLHandleContext provides a SafeHandle class for an X509CTL context as stored in its Handle property. This can be used instead of the raw IntPtr to avoid races with the garbage collector, ensuring that the X509Certificate object is not cleaned up from underneath you while you are still using the handle pointer.
This safe handle type represents a native CTL_CONTEXT.
A SafeCTLHandleContext for an X509CTL can be obtained by calling the GetSafeContext extension method.
public sealed class SafeCTLHandleContext : SafeHandleZeroOrMinusOneIsInvalid
Public NotInheritable Class SafeCTLHandleContext Inherits SafeHandleZeroOrMinusOneIsInvalid
public ref class SafeCTLHandleContext sealed : public SafeHandleZeroOrMinusOneIsInvalid
[<SealedAttribute>] type SafeCTLHandleContext = class inherit SafeHandleZeroOrMinusOneIsInvalid end
Thetype exposes the following members.
Gets a value indicating whether the handle is closed.(Inherited from .)
Gets a value that indicates whether the handle is invalid.(Inherited from .)
Marks the handle for releasing and freeing resources.(Inherited from .)
Manually increments the reference counter on(Inherited from instances. .)
Returns the value of the(Inherited from field. .)
Manually decrements the reference counter on a(Inherited from instance. .)
Releases all resources used by the(Inherited from class. .)
Determines whether the specified object is equal to the current object.(Inherited from .)
Serves as the default hash function.(Inherited from .)
Gets the(Inherited from of the current instance. .)
Marks a handle as no longer used.(Inherited from .)
Returns a string that represents the current object.(Inherited from .)
|The immediate caller must have SecurityPermission/UnmanagedCode to use this type.|