Redigera

Dela via


UniqueComInterfaceMarshaller<T> Class

Definition

Important

This API is not CLS-compliant.

Marshals COM interfaces using a StrategyBasedComWrappers instance that only creates unique native object wrappers (RCWs).

generic <typename T>
public ref class UniqueComInterfaceMarshaller 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.UniqueComInterfaceMarshaller<>))]
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public static class UniqueComInterfaceMarshaller<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.UniqueComInterfaceMarshaller<>))>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
type UniqueComInterfaceMarshaller<'T> = class
Public Class UniqueComInterfaceMarshaller(Of T)

Type Parameters

T

The managed type that represents a COM interface type

Inheritance
UniqueComInterfaceMarshaller<T>
Attributes

Remarks

This marshaller always passes the Unwrap and UniqueInstance flags to GetOrCreateObjectForComInstance(IntPtr, CreateObjectFlags).

Methods

ConvertToManaged(Void*)

Converts a COM interface pointer to a managed object.

ConvertToUnmanaged(T)

Converts a managed object to a COM interface pointer for the COM interface represented by T.

Free(Void*)

Releases a reference to the COM interface pointer.

Applies to