ComInterfaceMarshaller<T> 類別

定義

重要

此 API 不符合 CLS 規範。

使用 StrategyBasedComWrappers 實例封送處理 COM 介面。

generic <typename T>
public ref class ComInterfaceMarshaller abstract sealed
[System.CLSCompliant(false)]
[System.Runtime.InteropServices.Marshalling.CustomMarshaller(typeof(System.Runtime.InteropServices.Marshalling.CustomMarshallerAttribute+GenericPlaceholder), System.Runtime.InteropServices.Marshalling.MarshalMode.Default, typeof(System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<>))]
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public static class ComInterfaceMarshaller<T>
[<System.CLSCompliant(false)>]
[<System.Runtime.InteropServices.Marshalling.CustomMarshaller(typeof(System.Runtime.InteropServices.Marshalling.CustomMarshallerAttribute+GenericPlaceholder), System.Runtime.InteropServices.Marshalling.MarshalMode.Default, typeof(System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<>))>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
type ComInterfaceMarshaller<'T> = class
Public Class ComInterfaceMarshaller(Of T)

類型參數

T

表示 COM 介面類型的 Managed 型別

繼承
ComInterfaceMarshaller<T>
屬性

備註

這個封送處理器一律會將 Unwrap 旗標傳遞至 GetOrCreateObjectForComInstance(IntPtr, CreateObjectFlags)

方法

ConvertToManaged(Void*)

將 COM 介面指標轉換為 Managed 物件。

ConvertToUnmanaged(T)

將 Managed 物件轉換為 所 T表示之 COM 介面的 COM 介面指標。

Free(Void*)

釋放 COM 介面指標的參考。

適用於