Solved

Java DLL with Delphi App error

Posted on 2003-11-05
6
463 Views
Last Modified: 2010-05-18
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.
0
Comment
Question by:wuffy
  • 3
6 Comments
 
LVL 6

Expert Comment

by:swift99
Comment Utility
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
0
 
LVL 6

Expert Comment

by:swift99
Comment Utility
DLL's are usually written with either the "STDCALL" or "SAFECALL" calling convention, and byte alignment in all structures.
0
 

Author Comment

by:wuffy
Comment Utility
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.
0
 
LVL 6

Expert Comment

by:swift99
Comment Utility
Congratulations!  I guess you get your points back, since you resolved it yourself.
0
 

Accepted Solution

by:
modulo earned 0 total points
Comment Utility
PAQed with points refunded (125)

modulo
Community Support Moderator
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now