1
我想在我的Eclipse RCP插件中使用帶有控件的自定義OLE dll。如何在java eclipse插件中使用自定義的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是一種文件類型嗎? – SomeDude