ComWrappers.GetOrCreateComInterfaceForObject(Object, CreateComInterfaceFlags) Método

Definición

Permite crear una representación de COM del objeto proporcionado que se puede pasar a un entorno no administrado.Creates a COM representation of the supplied object that can be passed to a non-managed environment.

public:
 IntPtr GetOrCreateComInterfaceForObject(System::Object ^ instance, System::Runtime::InteropServices::CreateComInterfaceFlags flags);
public IntPtr GetOrCreateComInterfaceForObject (object instance, System.Runtime.InteropServices.CreateComInterfaceFlags flags);
member this.GetOrCreateComInterfaceForObject : obj * System.Runtime.InteropServices.CreateComInterfaceFlags -> nativeint
Public Function GetOrCreateComInterfaceForObject (instance As Object, flags As CreateComInterfaceFlags) As IntPtr

Parámetros

instance
Object

Objeto administrado que se debe exponer fuera del entorno de ejecución .NET.The managed object to expose outside the .NET runtime.

flags
CreateComInterfaceFlags

Marcas usadas para configurar la interfaz generada.Flags used to configure the generated interface.

Devoluciones

IntPtr

Interfaz COM generada que se puede pasar fuera del entorno de ejecución .NET.The generated COM interface that can be passed outside the .NET runtime.

Comentarios

Si previamente se ha creado una representación COM para el especificado instance mediante esta ComWrappers instancia, se devolverá la interfaz com creada anteriormente.If a COM representation was previously created for the specified instance using this ComWrappers instance, the previously created COM interface will be returned. Si no es así, se creará uno nuevo.If not, a new one will be created.

Se aplica a