You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem with reflection-property and its setf counterpart is that it checks for .Net property first, using Type.GetProperty and then utilizes property.GetValue instead of Type.InvokeMember, and the former does not work for COM objects.
The workaround would be to explicitly check whether an object type came from COM.
The text was updated successfully, but these errors were encountered:
So currently one needs to manually invoke .Net reflection APIs if he wants to utilize COM, and especially, IDispatch-based interfaces.
E.g.https://gist.github.com/Lovesan/843a5daf6ff1564668c51f2a3886c8ea
The problem with
reflection-property
and itssetf
counterpart is that it checks for .Net property first, usingType.GetProperty
and then utilizesproperty.GetValue
instead ofType.InvokeMember
, and the former does not work for COM objects.The workaround would be to explicitly check whether an object type came from COM.
The text was updated successfully, but these errors were encountered: