SafeHandleMarshaller<T>.ManagedToUnmanagedRef Struct

Definition

Marshals a SafeHandle as its underlying handle value as a ref parameter in managed-to-unmanaged scenarios like P/Invokes.

C#
public struct SafeHandleMarshaller<T>.ManagedToUnmanagedRef where T : SafeHandle

Type Parameters

T
Inheritance
SafeHandleMarshaller<T>.ManagedToUnmanagedRef

Constructors

Methods

Free()

Frees any resources and reference counts owned by the marshaller.

FromManaged(T)

Initializes the marshaller from a managed handle.

FromUnmanaged(IntPtr)

Initializes the marshaller from an unmanaged handle.

OnInvoked()

Notifies the marshaller that the native call has been invoked.

ToManagedFinally()

Retrieves the managed handle from the marshaller.

ToUnmanaged()

Retrieves the unmanaged handle.

Applies to

Proizvod Verzije
.NET 8, 9, 10