Solved

Dll C function call in Delphi.

Posted on 2002-07-26
3
158 Views
Last Modified: 2010-04-04
I have a function written in c and exported in a dll made by microsoft visual C++ 6.0 like this:

#define BIPSRESLV_API __declspec(dllexport)

BIPSRESLV_API int bips_resolve_once
          ( char * ldapHost     /* The Ldap server host name */
          , const char * node     /*The bitbus node name to be searched for */
          , char * cn          /*Returns the real cn found in the database (useful when using wildcards)*/
          , char * bipsHost     /*Returns the bips server host name */
          , int * bipsPort     /*Returns the bips server port number */
          , uint8_t * nodeAddress     /*Returns the bitbus node address (0-254) */
          );

How can I call this function from Delphi 6?
0
Comment
Question by:barzangy
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
robert_marquardt earned 500 total points
ID: 7179702
function bips_resolve_once
         (ldapHost: PChar;     // The Ldap server host name
          node: PChar;         // The bitbus node name to be searched for
          cn: PChar;           // Returns the real cn found in the database (useful when using wildcards)
          bipsHost: PChar;     // Returns the bips server host name
          var bipsPort: Integer;     // Returns the bips server port number
          var nodeAddress: Byte     // Returns the bitbus node address (0-254)
         ): Integer; stdccall;

implementation

function bips_resolve_once; external 'DLLName.DLL' name 'bips_resolve_once';
0
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 7179704
Oops, stdcall not stdccall. A typo.
0
 

Expert Comment

by:CleanupPing
ID: 9342990
barzangy:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 94
SUM 2 INTEGER ARRAYS INTO 1 10 93
Graphics32 under Delphi 10.1 Berlin 2 36
how to change, disabled button color FMX ? 1 13
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 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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 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

15 Experts available now in Live!

Get 1:1 Help Now