DispatchWrapper Constructor (Object^)
Initializes a new instance of the DispatchWrapper class with the object being wrapped.
Assembly: mscorlib (in mscorlib.dll)
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. |
for permission to call unmanaged code.
Security Action: Demand.
Associated Enumeration: UnmanagedCode
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1