Muokkaa

Jaa


ReadOnlySpanMarshaller<T,TUnmanagedElement>.ManagedToUnmanagedIn Struct

Definition

Supports marshalling from managed into unmanaged in a call from managed code to unmanaged code.

public:  where TUnmanagedElement : value classvalue class ReadOnlySpanMarshaller<T, TUnmanagedElement>::ManagedToUnmanagedIn
public ref struct ReadOnlySpanMarshaller<T,TUnmanagedElement>.ManagedToUnmanagedIn where TUnmanagedElement : struct
type ReadOnlySpanMarshaller<'T, 'UnmanagedElement (requires 'UnmanagedElement : struct)>.ManagedToUnmanagedIn = struct
Public Structure ReadOnlySpanMarshaller(Of T, TUnmanagedElement).ManagedToUnmanagedIn

Type Parameters

T
TUnmanagedElement
Inheritance
ReadOnlySpanMarshaller<T,TUnmanagedElement>.ManagedToUnmanagedIn

Properties

BufferSize

Gets the size of the caller-allocated buffer to allocate.

Methods

Free()

Frees resources.

FromManaged(ReadOnlySpan<T>, Span<TUnmanagedElement>)

Initializes the SpanMarshaller<T,TUnmanagedElement>.ManagedToUnmanagedIn marshaller.

GetManagedValuesSource()

Returns a span that points to the memory where the managed values of the array are stored.

GetPinnableReference()

Returns a reference to the marshalled array.

GetPinnableReference(ReadOnlySpan<T>)

Pins the managed span to a pointer to pass directly to unmanaged code.

GetUnmanagedValuesDestination()

Returns a span that points to the memory where the unmanaged values of the array should be stored.

ToUnmanaged()

Returns the unmanaged value representing the array.

Applies to