System.Runtime.InteropServices.UnknownWrapper Class

Wraps objects the marshaler should marshal as a VT_UNKNOWN.

See Also: UnknownWrapper Members

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public sealed class UnknownWrapper

Remarks

Only applies when the managed signature of a method takes an object.

Example

 int MyMethod(Object o); //Managed signature
     HRESULT MyMethod(VARIANT o); //COM signature
     MyObject o = new MyObject();
     MyMethod(o); //o gets passed as VARIANT VT_DISPATCH
     MyMethod(new UnknownWrapper(o)); //o gets passed as VARIANT VT_UNKNOWN

Requirements

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