PDA

View Full Version : Need help registering a DLL in Windows


mrgoodbar
03-15-2009, 02:51 AM
I am trying to use this Java library that allows me to edit the registry (http://www.trustice.com/java/jnireg/) It comes with a DLL that implements the Java interface. When i try to register it in windows with the command 'regsvr32.exe ICE_JNIRegistry.dll' it returns the error "ICE_JNIRegistry.dll was loaded, but the DllRegisterServer entry point was not found. This file cannot be registered."

Is defining an entry point a simple process? I dont know C or how the DLL Register works.

Craigslist.org
03-15-2009, 03:24 AM
Is this what you mean?

How to register (or re-register) a DLL or OCX file

Go to the Run item on the Start menum, and type:

regsvr32 <path & filename of dll or ocx> ?

You can find missing .dll files here.
http://www.dll-files.com
;)

mrgoodbar
03-15-2009, 06:17 AM
As far as i can tell, im not missing a DLL, im trying to register a new one. The issue seems to be within the DLL itself. The package includes the source to it so if i understood what was up i could fix it. Thanks for tryin though

Axiom
03-15-2009, 09:21 AM
I'm taking a really wild stab in the dark here...

Not been able to find the DllRegisterServer Entry Point suggests to me the file headers are not in the format that windows registry was expecting. A quick google suggests this error also occurs when you try to use regsvr32 to register a .net library. Since this is a java library it could be a similar issue.

But can't you just put the dll in the same folder as your executable? That way it will try to include from the local folder before contacting the registry to find the correct path?

Trueborn
03-15-2009, 03:04 PM
DllRegisterServer is only available in libraries that expose COM-compatible objects. This is simply a function DLL with no COM interop involved. All you should have to do is:

1) place the DLL in your windows\system32 folder
-OR-
2) place the DLL in the same path as your code executing code

Also, you know how to use JNI, correct?

mrgoodbar
03-15-2009, 04:35 PM
I feel like a dumb ass :rolleyes:. Thanks yall. I have an alright understanding of how to use JNI but Ive been using JNA https://jna.dev.java.net/