Sign in to follow this  
azherdev

[C++] Designing a DLL with callback functionality

Recommended Posts

Whats up? I am writing functionality to communicate with web services from my game developed in C++. I want to export that functionality into a DLL so I may re-use it in other languages (.net, c++, blitzmax, python, etc). But, I do not want the DLL functions to block the thread from which they are called from. My C++ game is single threaded and languages such as BlitzMax doesn't allow you to create threads. So basically, I need the DLL to handle threading at this point. So, my question is, how would you recommend to structure the DLL? My only idea that makes sense to me is: 1. Call function GetList() 2. Call function GetListDone(), true/false 3. If #2 returns TRUE, then call GetListResult() Am I missing something that is already made that will facilitate this? Remember, I need to be able to use this DLL without having to create threads in the language I am programming in.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this