ICustomMarshaler 介面

定義

提供用來處理方法呼叫的自訂包裝函式。

public interface class ICustomMarshaler
public interface ICustomMarshaler
[System.Runtime.InteropServices.ComVisible(true)]
public interface ICustomMarshaler
type ICustomMarshaler = interface
[<System.Runtime.InteropServices.ComVisible(true)>]
type ICustomMarshaler = interface
Public Interface ICustomMarshaler
衍生
屬性

備註

如需此 API 的詳細資訊,請參閱 ICustomMarshaler 的補充 API 備註

方法

CleanUpManagedData(Object)

針對不需要的 Managed 資料執行必要的清除。

CleanUpNativeData(IntPtr)

針對不需要的 Unmanaged 資料執行必要的清除。

GetNativeDataSize()

傳回要封送處理的原生資料 (Native Data) 的大小。

MarshalManagedToNative(Object)

將 Managed 資料轉換為 Unmanaged 資料。

MarshalNativeToManaged(IntPtr)

將 Unmanaged 資料轉換為 Managed 資料。

適用於