unowinreg.dll: can't load a 32-bit dll on amd 64bit platform

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
gringogordo
Posts: 6
Joined: Fri Apr 03, 2015 6:44 pm

unowinreg.dll: can't load a 32-bit dll on amd 64bit platform

Post by gringogordo »

Hi,

I'm making a first foray into UNO and after failing in my main attempt (bootstrapper issues) I've gone right back to basics and I'm trying to follow the beginners guide

https://wiki.openoffice.org/wiki/Docume ... uildScript

I am running Java on eclipse on Windows 7 64 bit. I have modified the build.xml for Windows (and Office 4) and although I'm no expert I think I've done it successfully - the application builds and tries to run.

Initially I got an error -
Exception in thread "main" java.lang.UnsatisfiedLinkError: no unowinreg in java.library.path
I copied unowinreg.dll from the sdk to the system32 folder and now I get this error
unowinreg.dll: can't load ia 32-bit .dll on a amd 64-bit platform
I can't find anything on this error since 2012 but I'm assuming there must be a way to run uno api on windows 64 ? The sdk I downloaded is 4.1.1 so it is current. Am I using an old approach and need to try something different or ?!

Thanks.
Cheers
Open Office 4.1 API
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: unowinreg.dll: can't load a 32-bit dll on amd 64bit plat

Post by RoryOF »

Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
gringogordo
Posts: 6
Joined: Fri Apr 03, 2015 6:44 pm

Re: unowinreg.dll: can't load a 32-bit dll on amd 64bit plat

Post by gringogordo »

Thanks. That looks very complex ? Does that mean the answer is that there is no relatively 'off the shelf' way to use uno in a 64 bit windows operating system ?
Cheers
Open Office 4.1 API
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: unowinreg.dll: can't load a 32-bit dll on amd 64bit plat

Post by RoryOF »

I can't say, as I'm not using such code. The two links I gave were where I would start to try to sort this problem, if I had it.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
gringogordo
Posts: 6
Joined: Fri Apr 03, 2015 6:44 pm

Re: unowinreg.dll: can't load a 32-bit dll on amd 64bit plat

Post by gringogordo »

Okay thanks for the pointer. To be honest, for my fairly simple requirement, if I have to go down that route I'll probably switch product for now. Possibly it was an error to mix environments.
Cheers
Open Office 4.1 API
gringogordo
Posts: 6
Joined: Fri Apr 03, 2015 6:44 pm

Re: unowinreg.dll: can't load a 32-bit dll on amd 64bit plat

Post by gringogordo »

Actually sorry looking at this post
viewtopic.php?f=44&t=75056it looks like it just isn't possible at the moment without writing a lot of extra code. Apologies I should have searched a bit more thoroughly first.
Cheers
Open Office 4.1 API
cdschorsch
Posts: 2
Joined: Fri Apr 17, 2015 10:12 am

Re: unowinreg.dll: can't load a 32-bit dll on amd 64bit plat

Post by cdschorsch »

You have to use a 32-Bit JDK for your eclipse project. Eclipse self can run with a 64 Bit JDK.
OpenOffice 4.1.1 on Ubuntu 14.04
Ritter
Posts: 2
Joined: Sun Aug 04, 2013 4:56 pm
Location: Germany

Re: unowinreg.dll: can't load a 32-bit dll on amd 64bit plat

Post by Ritter »

So, in order to use the Java UNO bridge to access an Openoffice installation on a 64bit Windows, we either
a) have to use a 32bit JVM
or
b) would have to use a 64bit Openoffice

However there's no 64bit Openoffice on Windows, AFAIK. So only a) would work, but most 64bit Windows installations have a 64bit JVM.

Well, that's not good. It's easy on Linux, but not on Windows, as usual. Sigh.
Openoffice v4 on Win7 64bit
Post Reply