ArrayMarshaller<T,TUnmanagedElement> 類別

定義

重要

此 API 不符合 CLS 規範。

表示陣列的封送器。

generic <typename T, typename TUnmanagedElement>
 where TUnmanagedElement : value classpublic ref class ArrayMarshaller abstract sealed
[System.CLSCompliant(false)]
[System.Runtime.InteropServices.Marshalling.ContiguousCollectionMarshaller]
[System.Runtime.InteropServices.Marshalling.CustomMarshaller(typeof(System.Runtime.InteropServices.Marshalling.CustomMarshallerAttribute+GenericPlaceholder[]), System.Runtime.InteropServices.Marshalling.MarshalMode.Default, typeof(System.Runtime.InteropServices.Marshalling.ArrayMarshaller<,>))]
[System.Runtime.InteropServices.Marshalling.CustomMarshaller(typeof(System.Runtime.InteropServices.Marshalling.CustomMarshallerAttribute+GenericPlaceholder[]), System.Runtime.InteropServices.Marshalling.MarshalMode.ManagedToUnmanagedIn, typeof(System.Runtime.InteropServices.Marshalling.ArrayMarshaller<,>+ManagedToUnmanagedIn))]
public static class ArrayMarshaller<T,TUnmanagedElement> where TUnmanagedElement : struct
[<System.CLSCompliant(false)>]
[<System.Runtime.InteropServices.Marshalling.ContiguousCollectionMarshaller>]
[<System.Runtime.InteropServices.Marshalling.CustomMarshaller(typeof(System.Runtime.InteropServices.Marshalling.CustomMarshallerAttribute+GenericPlaceholder[]), System.Runtime.InteropServices.Marshalling.MarshalMode.Default, typeof(System.Runtime.InteropServices.Marshalling.ArrayMarshaller<,>))>]
[<System.Runtime.InteropServices.Marshalling.CustomMarshaller(typeof(System.Runtime.InteropServices.Marshalling.CustomMarshallerAttribute+GenericPlaceholder[]), System.Runtime.InteropServices.Marshalling.MarshalMode.ManagedToUnmanagedIn, typeof(System.Runtime.InteropServices.Marshalling.ArrayMarshaller<,>+ManagedToUnmanagedIn))>]
type ArrayMarshaller<'T, 'UnmanagedElement (requires 'UnmanagedElement : struct)> = class
Public Class ArrayMarshaller(Of T, TUnmanagedElement)

類型參數

T

陣列元素類型。

TUnmanagedElement

元素類型的未管理型態。

繼承
ArrayMarshaller<T,TUnmanagedElement>
屬性

方法

名稱 Description
AllocateContainerForManagedElements(TUnmanagedElement*, Int32)

分配記憶體用於陣列的管理表示。

AllocateContainerForUnmanagedElements(T[], Int32)

分配記憶體給陣列的未管理表示。

Free(TUnmanagedElement*)

釋放記憶體給未管理陣列。

GetManagedValuesDestination(T[])

會取得陣列中管理元素的目的地。

GetManagedValuesSource(T[])

取得陣列中管理元素的來源。

GetUnmanagedValuesDestination(TUnmanagedElement*, Int32)

會為陣列中未管理的元素設定目的地。

GetUnmanagedValuesSource(TUnmanagedElement*, Int32)

取得陣列中未管理元素的來源。

適用於