Solved

Dll C function call in Delphi.

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

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
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…

688 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