How to convert C++ API function to Delphi

Posted on 2006-04-13
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

    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

    Thank You, this works fine

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
    Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
    This video discusses moving either the default database or any database to a new volume.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    760 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

    6 Experts available now in Live!

    Get 1:1 Help Now