Solved

Using C LIB files in Delphi

Posted on 1997-02-27
2
1,288 Views
Last Modified: 2013-12-04
I have a couple of C LIB files, and respective header files.
I need to make use of these from Delphi.
 
The only way I can figure is to build .OBJ object files, and include them in my app.
Now my problem is...HOW ?

Some-one mentioned to me I should use PLINK, apparantly a feature which was supplied as part of dos 3.x
 
However, I would assume the .LIBs are 32 bit, as they have been developed for NT use only.
 
Since my knowledge of C is limited, and the LIBs contain MANY calls, I don't want to go through the excersize of developing a DLL, in C, unless it's my last option.

What now ???
0
Comment
Question by:bond022797
2 Comments
 
LVL 4

Accepted Solution

by:
marko020397 earned 200 total points
ID: 1298885
Delphi uses libraries for accessing to databases. It uses idapi.lib or idapi32.lib in Delphi 2. You should have a BDE.INT somewhere in your Delphi directories. It's a sample of IDAPI.H translated to Delphi pascal. If you installed sources to you have all the sources for database components, which uses idapi.lib.

In Project Options/Library/Library Path you should set a path to your libraries.

I tnink this examples should help you. I didn't have enough time to try to make an example of using a library. Let me know if you had some success. If not write back and I'll try to make an example.

Marko
0
 

Author Comment

by:bond022797
ID: 1298886
Marko

Thanks for the reply. However, the idapi lib is actually a DLL.
The file formats I have are *.LIB. I performed a search in the
Borland dirs for IDAPI*, and found only DLLs.

I am using a full blown version of Delphi 2.1 (w/src), and
am led to believe I have all borland want me to...

Project Options/Library... I assume you are explaining a menu
selection...  No such menu option

Project/Options supplies a dialog, with no indication to defining
library paths. I checked out Tools/Options/Library, but as far as I can tell, this only points to Delphi style libraries (.DCU).

Once again, thanks for the answer. Perhaps you could elaborate a little more. I feel though, that I will need to develop a DLL from C anyways, which can then be used from Delphi.

Hope to hear from you soon
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

839 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