| PropertyManagerPage2Handler9Wrapper 类 |
Passing objects that use generics as IDispatch during COM interop causes a invalid cast exception.
This is a proxy for implementations of IPropertyManagerPage2Handler9. It
seems that passing an instance of this interface that uses generics somewhere in the inheritence
chain causes COM to bork.
See: http://stackoverflow.com/questions/35438895/passing-an-object-in-c-sharp-that-inherits-from-a-generic-causes-a-cast-exceptio/35449486#35449486
The solution is just to create a proxy for the interface that wraps the original instance. There
are probably some nuget packages around that can do this automagically but I just used resharper
to generate the below code.
继承层次 SystemObject
Du.SolidWorks.ExtensionPropertyManagerPage2Handler9Wrapper
命名空间:
Du.SolidWorks.Extension
程序集:
Du.SolidWorks (在 Du.SolidWorks.dll 中) 版本:0.1.1.0 (0.1.1)
语法 public class PropertyManagerPage2Handler9Wrapper : IPropertyManagerPage2Handler9
Public Class PropertyManagerPage2Handler9Wrapper
Implements IPropertyManagerPage2Handler9
PropertyManagerPage2Handler9Wrapper 类型公开以下成员。
构造函数 方法 扩展方法 参见