UnknownWrapper Class
Collapse the table of content
Expand the table of content

UnknownWrapper Class

Wraps objects the marshaler should marshal as a VT_UNKNOWN.

For a list of all members of this type, see UnknownWrapper Members.


[Visual Basic]
NotInheritable Public Class UnknownWrapper
public sealed class UnknownWrapper
public __gc __sealed class UnknownWrapper
public class UnknownWrapper

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


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

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


Namespace: System.Runtime.InteropServices

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: Mscorlib (in Mscorlib.dll)

See Also

UnknownWrapper Members | System.Runtime.InteropServices Namespace

© 2015 Microsoft