DispatchWrapper Constructor (Object^)

 

Initializes a new instance of the DispatchWrapper class with the object being wrapped.

Namespace:   System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)

public:
DispatchWrapper(
	Object^ obj
)

Parameters

obj
Type: System::Object^

The object to be wrapped and converted to VT_DISPATCH.

Exception Condition
ArgumentException

obj is not a class or an array.

-or-

obj does not support IDispatch.

InvalidOperationException

The obj parameter was marked with a ComVisibleAttribute attribute that was passed a value of false.

-or-

The obj parameter inherits from a type marked with a ComVisibleAttribute attribute that was passed a value of false.

SecurityPermission

for permission to call unmanaged code.

Security Action: Demand.

Associated Enumeration: UnmanagedCode

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
Show: