We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1ed0db commit 43b1ce5Copy full SHA for 43b1ce5
src/libraries/Common/src/System/Runtime/InteropServices/Variant.cs
@@ -202,7 +202,7 @@ public unsafe void CopyFromIndirect(object value)
202
break;
203
204
case VarEnum.VT_DISPATCH:
205
- *(IntPtr*)this._typeUnion._unionTypes._byref = Marshal.GetComInterfaceForObject<object, IDispatch>(value);
+ *(IntPtr*)this._typeUnion._unionTypes._byref = Marshal.GetIDispatchForObject(value);
206
207
208
case VarEnum.VT_BSTR:
@@ -698,7 +698,7 @@ public object? AsDispatch
698
}
699
else
700
{
701
- _typeUnion._unionTypes._dispatch = Marshal.GetComInterfaceForObject<object, IDispatch>(value);
+ _typeUnion._unionTypes._dispatch = Marshal.GetIDispatchForObject(value);
702
703
704
0 commit comments