How to convert C++ API function to Delphi

Posted on 2006-04-13
Medium Priority
Last Modified: 2008-01-09
Dear sirs:

Please somebody can help me to interpret the following function in C++ to convert it to DELPHI

            BOOL debug,                    /* enable debug info printing */
            void FAR (*fcallback)(void));         /* callback function */

SEECAR_RET_STATUS  is a enum type

SEEAPI is defined as
             #define      SEEAPI      __declspec(dllimport)

The DLL file is SeeCar.dll

Best regards.
Question by:mbrlaser
LVL 28

Accepted Solution

2266180 earned 1000 total points
ID: 16446745
from the top of my head, something like:

type TProcedure=procedure;// has no params

function seecar_init(debug:boolean; fcallback:TProcedure):SEECAR_RET_STATUS; cdecl; external 'SeeCar.dll';

let me know if there are any issues with the above. I'll get home to my delphi enabled machine in about 1-2 hours.


Author Comment

ID: 16448165
Thank You, this works fine

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Loops Section Overview
Suggested Courses

840 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