picciopiccio
picciopiccio

Reputation: 319

load 64-bit ole in 32 bit swt eclipse rcp application

I have recompiled a 32bit ole control for 64-bit windows platform (this is necessary due to the large amound of memory that ole is allocating in this appliance).

I need to load this inside my eclipse rcp application that is running on JDK32bit and eclipse 32bit (windows 32bit emualtion on 64 bit). I whish to not recompile the rcp application beccause it is huge and I'm afraid of many thigs could go wrong.

So far (on 32 bit platform), I used the method described at this site ActiveX Support In SWT to load this activeX. Now on 64-bit windows the loading of ole fails (it launches an exception).

  1. Is in your opinion necessary that I convert the whole rcp application in win64 (jdk64)?
  2. Does anyone know how can I diagnose if the component is well registered? Is there a tool to inspect all COM object registered in the system (I've found only 32 bit tools that doesn't work under 64-bit). Actually the only method I used is to realize another .NET application that includes in its references the dll of activex component.
  3. Has anybody ever tried to load 64bit ole in eclipse rcp application (is it possible)? Any advice is very wellcome (I spent many our to try to solve this problem)

Upvotes: 1

Views: 1191

Answers (2)

picciopiccio
picciopiccio

Reputation: 319

Thank you Konstantin. I've found the problem I had and I would like to puntualize a couple of things that could helps someone in the future who needs to port 32-bit to 64-bit OLE RCP application.

  1. Take care to your jdk installed. If you have both 32-bit and 64-bit you should check in your launch configuration (Debug and Run Configurations -> Main Tab) what JDK you are pointing to. If application is a porting probably your are point to the wrong 32bit JDK
  2. Take care to import the correct swt plugin. In your launch configuration (Debug and Run Configurations -> Plugin Tab) in the filter type *swt to search for swt plugins installed and select the 64-bit version
  3. For OLE porting I found very useful these links

I hope that all my efforts will help someone else.

Upvotes: 1

Konstantin Komissarchik
Konstantin Komissarchik

Reputation: 29139

You cannot mix 32-bit and 64-bit components in the same process. To load a 64-bit OLE control in an RCP app you need 64-bit JDK and 64-bit Eclipse runtime.

Upvotes: 3

Related Questions