Link to home
Start Free TrialLog in
Avatar of wuffy
wuffy

asked on

Java DLL with Delphi App error

We got this dll from another company to integrate with our delphi application.  The problem is we can't seem to make the java dll work properly.  We are not exactly sure why.  We asked the third party company to help but they don't know the answer either.  So far they told us to use visual c++ to create the app to connect with their dll.  However, the program is entirely finished in delphi and we are in a strict deadline to finish the application within a few weeks.  Is there a work around for this problem or could delphi not communicate with java at all?

Please provide us with a basic code on how to integrate a java dll with the delphi application.  

Btw. One of the errors we are getting is something like:

"the proceedure entry point <function name> could not be located in the dynamic link library *.dll."  

Any help will be greatly appreciated.
Avatar of swift99
swift99

1. Jave generally is not used to create DLL's.  Java is platform independent, while DLL's are strictly for Windows.   It would be possible to encapsulate Java code in a DLL that incorporated a JVM, but it would be a bit of a crazy way to do it.

2. C typically prepends an _ to the beginning of the function names

3. Is the DLL an ActiveX/COM interface?  Try registering it, instantiating its object, and calling the object's method.

4. Check M$oft's knowledge base for a DLL explorer type thing.

5. Look up the specs on JNI

6. IBM AlphaWorks used to have a two way bridge for Java to COM interfaces
DLL's are usually written with either the "STDCALL" or "SAFECALL" calling convention, and byte alignment in all structures.
Avatar of wuffy

ASKER

We were able to find the reason for the error.   The DLL needed something from Java to run.   Unfortunately the DLL developer was not able to tell us this bit.
Congratulations!  I guess you get your points back, since you resolved it yourself.
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial