Multithreaded C++ DLL with VB
Hi
I have a DLL written in C++ and a VB app which uses this DLL. The VB app calls 2 functions in the DLL: sendMessage(...) and getMessage().
The sendMessage() function can take some time to execute, and the VB app waits for it to finish before continuing with it's own execution.
I need the getMessage() function to be called during the sendMessage execution from the VB app.
I presume I would need to use threading to achieve this, which I know nothing about. Maybe it should work like this:
VB calls sendMessage() function. The DLL starts a new thread and passes this operation to the new thread. The main thread then returns to VB immediately. Whilst the new thread is busy executing the operation, VB can call getMessage() and the main thread will handle this request.
Any assistance would be greatly appreciated :)
P.S. I'm using Visual Studio 6.0 on Windows XP.
Hint: Visual studio 2005 Express is free. There are even offers that let you get standard free, I think.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement