?
Solved

Delphi and C++

Posted on 1998-11-05
3
Medium Priority
?
250 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 300 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
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…
Suggested Courses
Course of the Month13 days, 14 hours left to enroll

801 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