我们已在C#中创建了用户控件,并通过API将其添加到EA
Repository.AddWindow(" Addin View"," Framework.MyEAControl")作为MyEAControl;
namespace Framework
{
[Guid("2F8CD700-575C-41F3-91C8-D269376AC0D9")]
[ComVisible(true)]
/// <summary>
/// Description of MyEAControl.
/// </summary>
public partial class MyEAControl: UserControl
{
public MyEAControl()
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
}
}
}
但是api返回null。当EA被打开时,它会将objectrefrence设置为EA中的对象异常实例
但在EA中,他们告诉自己一旦在目标系统上创建并注册了自定义控件,就可以使用Repository对象的AddWindow()方法添加它。
但如何在目标系统上注册