Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6861333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:31:17+00:00 2026-05-27T02:31:17+00:00

I try to use C++ DLL function in my Delphi application. I’ve the problem

  • 0

I try to use C++ DLL function in my Delphi application. I’ve the problem in using call back function like that:

Exported functions definitions in C++:

typedef void (__CDECL__* RegisterCallBacksFunction)(AudioChunkCallBackFunction, CaptureEventCallBackFunction, LogMngr*);

Callback definitions:

typedef void (__CDECL__*AudioChunkCallBackFunction)(AudioChunkRef, CStdString& capturePort);
typedef void (__CDECL__*CaptureEventCallBackFunction)(CaptureEventRef, CStdString& capturePort);

AudioChunkRef and CaptureEventRef :

typedef boost::shared_ptr<AudioChunk> AudioChunkRef;
typedef boost::shared_ptr<CaptureEvent> CaptureEventRef;

And AudioChunk and CaptureEvent are C++ class:

class __declspec( dllexport ) AudioChunk // or CaptureEvent (both are similar)
{
public:
//some functions and variables
private:
//some functions and variables
};

C++ library exports:

extern "C"
{
__declspec( dllexport ) void __CDECL__  RegisterCallBacks(AudioChunkCallBackFunction, CaptureEventCallBackFunction, LogMngr*);
}

How can use RegisterCallBacks function in my Delphi app. ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:31:18+00:00Added an answer on May 27, 2026 at 2:31 am

    AFAIK you can not import C++ classes directly to map Delphi classes. That is, even if you get a pointer to a AudioChunk instance, you won’t be able to access it directly from Delphi. So use of your callbacks won’t be possible directly.

    So you’ll have to define by hand a “flat” C interface to be imported in Delphi, which will implement the callback in C++, then expose the interface as C functions, with parameters as C struct instead of C++ boost classes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

the problem starts with a function call to a mono function that is not
In my Win32 C++ DLL I find that if I try to use RegisterClassEx
I try to use single quotes as much as possible and I've noticed that
I try to use amazon API using PHP. If I use print_r($parsed_xml->Items->Item->ItemAttributes) it show
In a Project of mine, I use a Delphi Application which dynamically loads a
I am trying to use a dll in Python source using the ctypes. I
When I try to use QJson library application cannot even start. I get message
I have a c# .net 2.0 CF application that interfaces with a native DLL
I need to use a DLL created using .NET framework. This DLL is made
I have a DLL with one single function That gets five doubles and one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.