Solved

Java DLL with Delphi App error

Posted on 2003-11-05
6
468 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
ID: 9691726
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
ID: 9691729
DLL's are usually written with either the "STDCALL" or "SAFECALL" calling convention, and byte alignment in all structures.
0
 

Author Comment

by:wuffy
ID: 11342104
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
ID: 11344457
Congratulations!  I guess you get your points back, since you resolved it yourself.
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12743142
PAQed with points refunded (125)

modulo
Community Support Moderator
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

813 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

12 Experts available now in Live!

Get 1:1 Help Now