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.