首页 \ 问答 \ 如何在java eclipse插件中使用自定义OLE dll?(How to use a custom OLE dll in a java eclipse plugin?)

如何在java eclipse插件中使用自定义OLE dll?(How to use a custom OLE dll in a java eclipse plugin?)

我想在我的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的信息。


I'm trying to use a custom OLE dll with a control in my Eclipse RCP Plugin.

The dll is in my working directory, but if I try to use it I get a SWTException:

I use this code:

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();

And get this Exception:

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)
  ...

How can I tell my plugin where to look for the Class ID? There must be some basic point I'm missing but I didn't find anything about using custom OLE dlls.


原文:https://stackoverflow.com/questions/34283093
更新时间:2022-06-28 18:06

最满意答案

使用与屏幕宽高比匹配的正投影,而不是仅发送一堆投影。 除非你有一个方形屏幕,你的左/右不应该与你的上/下相同,否则你会看到歪斜。


Use an ortho projection that matches your aspect ratio of the screen rather than just sending a bunch of ones. Unless you have a square screen, your left/right shouldn't be the same as your top/bottom or you will see skew.

相关问答

更多
  • OpenGL ES和OpenGL之间的两个更显着的区别是删除了glBegin ... glEnd调用语义进行原始渲染(有利于顶点数组),并为顶点坐标和属性引入了定点数据类型以更好地支持嵌入式处理器的计算能力往往缺乏FPU 看看这里: OpenGL_ES Two of the more significant differences between OpenGL ES and OpenGL are the removal of the glBegin ... glEnd calling semantics f ...
  • 这只是猜测。 如果要混合, 则应在glClear函数中使用GL_DEPTH_BUFFER_BIT标志: glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) The problem was Allegro (the library my game uses) uses glBlendFuncSeparate when using OpenGL ES 2.0 -- which SHOULD work, but some phones don't support ...
  • 有了屏幕截图的好处,我敢说你的设计师已经为面部分配了适当的材料 - 你可能会有一个.MTL文件,该文件与OBJ文件一起使用并包含许多以Ka , Kd和Ns开头的行 - 但不应用任何纹理。 从我可以用obj2opengl做出的,该脚本假定更多的视频游戏风格的呈现,其中,在一些实现中,为表面给出的颜色属性被丢弃并且仅应用纹理。 所以,从技术上讲,你是正确的禁用纹理,但如果你使用ES 1.x你可能想要添加的是一些glMaterial调用,使用脚本似乎不保留的数据。 或者,对于ES 2.x,您将需要模拟经典环境+漫 ...
  • 免责声明:此信息基于官方OpenGL | ES规范。 我不知道iphone上的OpenGL | ES实现是否支持压缩纹理。 理论上它应该至少模拟压缩纹理,但你现在永远不会。 您可以通过glCompressedTexImage2D调用加载8位/像素纹理。 您最想要使用的压缩类型是GL_PALETTE8_RGBA8_OES 。 不能直接存储额外的alpha通道和调色板。 您可以将第二个纹理单元用于alpha分量,或者在颜色量化期间考虑alpha并使用包含alpha的调色板格式。 在网上某处有一个名为BRIGHT ...
  • VBO只是让驱动程序将您的几何存储在(可能)视频内存中,而不是像顶点数组一样将其上传到驱动程序的每一帧。 glScalef() , glTranslatef()和glRotatef()工作方式相同。 VBOs just let the driver stash your geometry in (probably) video memory rather than uploading it to the driver each frame as with vertex arrays. glScalef(), ...
  • PVRTC,ATITC,S3TC等等,GPU本地压缩纹理应该会减少内存使用并提高渲染性能。 例如(对不起,在C中,你可以像使用Java中的GL11.glGetString一样实现它), const char *extensions = glGetString(GL_EXTENSIONS); int isPVRTCsupported = strstr(extensions, "GL_IMG_texture_compression_pvrtc") != 0; int isATITCsupported = str ...
  • 在程序初始化时,您需要加载2个位图并将其作为2个新纹理上传到GPU( glGenTextures / glBindTexture / GLUtils.texImage2D ),这应该为您提供两个不同的textureID: textureIDs[0]和textureIDs[1] 。 然后,当您在public void draw(GL10 gl)绘制立方体时,您需要使用textureIDs[0]或textureIDs[1]添加对glBindTexture的调用,具体取决于您的按钮状态。 您当前的代码仅将2个纹理 ...
  • 可能你正在用非整数值翻译你的四边形,这可能导致纹理偏离中心采样,并可能导致一些像这样的工件。 如果你确保所有的2d翻译与屏幕像素对齐,我想你不会再看到问题了。 Likely you're translating your quads by non-integral values, which can cause textures to get sampled off-center, and can cause some artifacts like that. If you make sure that a ...
  • 这个问题的答案可以在这里找到 如何创建一个适用于Retina显示的CGBitmapContext,而不是浪费空间进行常规显示? 我基本上做的是将纹理和缓冲区乘以屏幕的比例因子,因为这只产生了1/4大小的纹理,我不得不将上下文乘以比例因子 CGContextScaleCTM(context, scaleFactor, scaleFactor); The answer to this question can be found here How to create a CGBitmapContext which ...
  • 使用与屏幕宽高比匹配的正投影,而不是仅发送一堆投影。 除非你有一个方形屏幕,你的左/右不应该与你的上/下相同,否则你会看到歪斜。 Use an ortho projection that matches your aspect ratio of the screen rather than just sending a bunch of ones. Unless you have a square screen, your left/right shouldn't be the same as your t ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)