Export (0) Print
Expand All

UnknownWrapper Class

Wraps objects the marshaler should marshal as a VT_UNKNOWN.

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

System.Object
   System.Runtime.InteropServices.UnknownWrapper

[Visual Basic]
NotInheritable Public Class UnknownWrapper
[C#]
public sealed class UnknownWrapper
[C++]
public __gc __sealed class UnknownWrapper
[JScript]
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.

Remarks

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
   

Requirements

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

Show:
© 2014 Microsoft