Marshal.GetComObjectData(Object, Object) Método

Definición

Recupera datos a los que hace referencia la clave especificada desde el objeto COM especificado.

public:
 static System::Object ^ GetComObjectData(System::Object ^ obj, System::Object ^ key);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static object? GetComObjectData (object obj, object key);
public static object GetComObjectData (object obj, object key);
public static object? GetComObjectData (object obj, object key);
[System.Security.SecurityCritical]
public static object GetComObjectData (object obj, object key);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member GetComObjectData : obj * obj -> obj
static member GetComObjectData : obj * obj -> obj
[<System.Security.SecurityCritical>]
static member GetComObjectData : obj * obj -> obj
Public Shared Function GetComObjectData (obj As Object, key As Object) As Object

Parámetros

obj
Object

Objeto COM que contiene los datos que desea.

key
Object

Clave en la tabla de hash interna de obj de la que se recuperan los datos.

Devoluciones

Object

Datos representados por el parámetro key en la tabla hash interna del parámetro obj.

Atributos

Excepciones

obj es null.

o bien

key es null.

obj no es un objeto COM.

o bien

objes un objeto Windows Runtime.

Comentarios

Todos los objetos COM encapsulados en un contenedor callable en tiempo de ejecución tienen una tabla hash asociada, que GetComObjectData recupera. Marshal.SetComObjectData agrega datos a la tabla hash. Nunca debe tener que llamar a ninguno de los métodos desde el código.

Se aplica a

Consulte también