Link to home
Start Free TrialLog in
Avatar of gadige
gadige

asked on

callback function and SendMessage.

Hi,
Here is a design of a peice of code. Let me know if this can cause a race condition or a deadlock.

I have an MFC application, which is using and linking to a MFC extension dll. In my MFC extension dll, i have a class which  holds a callback pointer of one class instance of the main MFC application. When an event is received, this callback pointer is called from the MFC extension dll new thread(second thread in dll always alive). The callback handler function in the main application does a SendMessage to one of its child windows or to itself. If the callback from the MFC extension is called multiple times, all the messages sent to a window from the callback handler are not received by that window. Is there something wrong in this?? Let me know any good solution to this kind of problems.

Thankyou,
Aruna.
ASKER CERTIFIED SOLUTION
Avatar of Agarici
Agarici
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial