Marshal.GetComObjectData(Object, Object) Metodo

Definizione

Recupera i dati ai quali fa riferimento la chiave specificata dall'oggetto COM specificato.

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

Parametri

obj
Object

Oggetto COM che contiene i dati desiderati.

key
Object

Chiave nella tabella hash interna di obj da cui recuperare i dati.

Restituisce

Dati rappresentati dal parametro key nella tabella hash interna del parametro obj.

Attributi

Eccezioni

obj è null.

-oppure-

key è null.

obj non è un oggetto COM.

-oppure-

objè un oggetto Windows Runtime.

Commenti

Tutti gli oggetti COM di cui è stato eseguito il wrapping in un wrapper chiamabile di runtime hanno una tabella hash associata, che GetComObjectData recupera. Marshal.SetComObjectData aggiunge dati alla tabella hash. Non è mai necessario chiamare uno dei due metodi dal codice.

Si applica a

Vedi anche