UnknownWrapper UnknownWrapper UnknownWrapper UnknownWrapper Class

Definition

Warning

This API is now obsolete.

Wraps objects the marshaler should marshal as a VT_UNKNOWN.

public ref class UnknownWrapper sealed
[System.Runtime.InteropServices.ComVisible(true)]
[System.Obsolete("UnknownWrapper and support for marshalling to the VARIANT type may be unavailable in future releases.")]
[Serializable]
public sealed class UnknownWrapper
type UnknownWrapper = class
Public NotInheritable Class UnknownWrapper
Inheritance
UnknownWrapperUnknownWrapperUnknownWrapperUnknownWrapper
Attributes
ComVisibleAttribute ObsoleteAttribute SerializableAttribute

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  

Constructors

UnknownWrapper(Object) UnknownWrapper(Object) UnknownWrapper(Object) UnknownWrapper(Object)

Initializes a new instance of the UnknownWrapper class with the object to be wrapped.

Properties

WrappedObject WrappedObject WrappedObject WrappedObject

Gets the object contained by this wrapper.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to