【发布时间】:2015-12-15 07:14:04
【问题描述】:
我正在尝试在我的 Eclipse RCP 插件中使用带有控件的自定义 OLE dll。
该 dll 在我的工作目录中,但如果我尝试使用它,我会收到 SWTException:
我使用这个代码:
Display display = Display.getCurrent();
Shell shell = new Shell(display);
OleFrame frame = new OleFrame(shell, SWT.NONE);
OleClientSite site = new OleClientSite(frame, SWT.NONE, "MyCustomDll.TestControl");
OleAutomation test = new OleAutomation(site);
shell.open();
并得到这个异常:
org.eclipse.swt.SWTException: Class ID not found in registry
at org.eclipse.swt.ole.win32.OLE.error(OLE.java:317)
at org.eclipse.swt.ole.win32.OLE.error(OLE.java:283)
at org.eclipse.swt.ole.win32.OleClientSite.<init>(OleClientSite.java:226)
...
如何告诉我的插件在哪里寻找类 ID? 一定有一些我遗漏的基本点,但我没有找到任何关于使用自定义 OLE dll 的信息。
【问题讨论】:
-
我认为你必须指定文件的完整路径。 TestControl 是文件类型吗?
标签: java dll swt eclipse-rcp ole