Solved

Delphi and C++

Posted on 1998-11-05
3
245 Views
Last Modified: 2010-04-04
When I call a certain procedure in a DLL I have been given, I get a C++ object whose methods I must call to perform the functions which I desire. How do I handle the C++ object in a Delphi environment? I have written a c++ module, but on linking with {$L file.obj} I get an "invalid format" message!
0
Comment
Question by:BigRat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
Thaddy earned 100 total points
ID: 1345762
Your dll is probably written with Microsoft C++
Th object format is COFF and is not (directly) supported by Delphi.
My work around is this:
Load your delphi files in C++Builder 3 (Builder can compile pas files) then, on je project options|Advanced compiler, set MFC compatibility on and output C++ Object files (.obj).
C++ Builder 3 supports COFF, so your application now will compile.
If you use any d4 options: Bad luck, c++Builder won't compile that stuff


0
 
LVL 27

Author Comment

by:BigRat
ID: 1345763
I actually don't have c++Builder, just Delphi 3 and Microsoft C++ Subscription, but the fact that file file is COFF format explains the error. I'll just try something else....
      rats!!!!
0
 
LVL 2

Expert Comment

by:Thaddy
ID: 1345764
You can probably convert the header file to the dll with drBob's headerconvert utility.
Then you can almost certainly use the dll from Delphi.
It's on most good delphi sites or on http://www.drbob42.com/delphi/default.htm
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

695 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