Solved

Dll C function call in Delphi.

Posted on 2002-07-26
3
157 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 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

18 Experts available now in Live!

Get 1:1 Help Now