Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Runtime.​InteropServices.​Marshalling.​StrategyBasedComWrappers

Assembly: System.Runtime.InteropServices

Inheritance: object → ComWrappers → StrategyBasedComWrappers

A <see cref="T:System.Runtime.InteropServices.ComWrappers" /> -based type that uses customizable strategy objects to implement COM object wrappers and managed object wrappers exposed to COM.

Methods

protected ComInterfaceEntry*
ComputeVtables​(object obj, CreateComInterfaceFlags flags, Int32& count)
CreateCacheStrategy​()
Returns The caching strategy to use for the new COM object.
Creates the caching strategy for a new COM object wrapper.
protected object
CreateObject​(nint externalComObject, CreateObjectFlags flags)
externalComObject Object to import for usage into the .NET runtime.
flags A bitwise combination of the enumeration values that describes the external object.
Returns A managed object associated with the supplied external COM object.
Creates a managed object for the object that <paramref name="externalComObject" /> points to, respecting the values of <paramref name="flags" /> .
protected object
CreateObject​(nint externalComObject, CreateObjectFlags flags, object userState, CreatedWrapperFlags& wrapperFlags)
GetOrCreateInterfaceDetailsStrategy​()
Returns The interface details strategy to use for the new COM object.
Gets or creates the interface details strategy for a new COM object wrapper.
protected IIUnknownStrategy
GetOrCreateIUnknownStrategy​()
Returns The IUnknown strategy to use for the new COM object.
Gets or creates the IUnknown strategy for a new COM object wrapper.
protected void
ReleaseObjects​(Collections.IEnumerable objects)
objects Collection of objects to release.
Releases a collection of objects outside of the normal object or COM interface lifetime.
public nint
GetOrCreateComInterfaceForObject​(object instance, CreateComInterfaceFlags flags)
Inherited from ComWrappers
instance The managed object to expose outside the .NET runtime.
flags Flags used to configure the generated interface.
Returns The generated COM interface, as a pointer to the <code>IUnknown</code> interface implementation, that can be passed outside the .NET runtime.
Creates a COM representation of the supplied object that can be passed to a non-managed environment.
public object
GetOrCreateObjectForComInstance​(nint externalComObject, CreateObjectFlags flags)
Inherited from ComWrappers
externalComObject Object to import for usage into the .NET runtime.
flags Flags used to describe the external object.
Returns A managed object associated with the supplied external COM object.
Gets the currently registered managed object or creates a new managed object and registers it.
public object
GetOrCreateObjectForComInstance​(nint externalComObject, CreateObjectFlags flags, object userState)
Inherited from ComWrappers
externalComObject The object to import for usage into the .NET runtime.
flags A bitwise combination of the enumeration values that describes the external object.
userState A state object to use to help create the wrapping .NET object.
Returns Returns a managed object associated with the supplied external COM object.
Gets the currently registered managed object or creates a new managed object and registers it.
public object
GetOrRegisterObjectForComInstance​(nint externalComObject, CreateObjectFlags flags, object wrapper)
Inherited from ComWrappers
externalComObject Object to import for usage into the .NET runtime.
flags Flags used to describe the external object.
wrapper The object to use as the wrapper for the external object.
Returns A managed object associated with the supplied external COM object.
Gets the currently registered managed object or uses the supplied managed object and registers it.
public object
GetOrRegisterObjectForComInstance​(nint externalComObject, CreateObjectFlags flags, object wrapper, nint inner)
Inherited from ComWrappers
externalComObject Object to import for usage into the .NET runtime.
flags Flags used to describe the external object.
wrapper The <see cref="T:System.Object" /> to be used as the wrapper for the external object
inner Inner for COM aggregation scenarios
Returns Returns a managed object associated with the supplied external COM object.
Get the currently registered managed object or uses the supplied managed object and registers it.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object