c# 我要window应用程序 打开我的类库插件方法,能调用,调试和得到返回值
怎么在window应用代码里获得运行插件dll的返回值
```c#
public bool ConnectToSW(object ThisSW, int Cookie)
{
iSwApp = (ISldWorks)ThisSW;
addinCookieID = Cookie;
//Debug.WriteLine("Cookie=" + Convert.ToString( Cookie));
iSwApp.SetAddinCallbackInfo(0, this, addinCookieID);
iCmdMgr = iSwApp.GetCommandManager(addinCookieID);
//主窗口 = new 主窗口();
// 主窗口.SwApp2 = iSwApp;
// 主窗口.Show();
//AddCommandMgr();
var SwEventPtr = (SolidWorks.Interop.sldworks.SldWorks)iSwApp;
SwEventPtr.FileOpenNotify2 += new DSldWorksEvents_FileOpenNotify2EventHandler(swApp_FileOpenNotify2);
return true;
}
else if (输入内容=="sld")
{
SldWorks sldWorks = new SldWorks();
sldWorks.Visible = true;///这里打开的solidworks打开后,调试关了,solidworks还在后台
AddinStudy addinStudy = new AddinStudy();
addinStudy.ConnectToSW();
}
public static void Main()
{
主窗口 主窗口 = new 主窗口();
Application.Run(主窗口);
}