System.Runtime.InteropServices.Marshal.GetComObjectData Method

Retrieves data that is referenced by the specified key from the specified COM object.

Syntax

public static object GetComObjectData (object obj, object key)

Parameters

obj
The COM object that contains the data that you want.
key
The key in the internal hash table of obj to retrieve the data from.

Returns

The data represented by the key parameter in the internal hash table of the obj parameter.

Remarks

All COM objects wrapped in a Runtime Callable Wrapper have an associated hash table, which Marshal.GetComObjectData(object, object) retrieves. Marshal.SetComObjectData(object, object, object) adds data to the hash table. You should never have to call either method from your code.

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0