stavrop
stavrop

Reputation: 485

How to send messages between dlls

I am creating an application with the following characteristics:

My problem, is how to make commManager notify the mainLib about certain messages it receives.

I suppose something like PostThreadMessage() could be the solution, but how do I implement it inside the dll?

Upvotes: 0

Views: 354

Answers (1)

001
001

Reputation: 13533

Presumably, commManager runs on it's own thread. mainLib would need to create a message queue as described here. When mainLib creates commManager it would have to pass its thread id to it.

If you want blocking, another option would be to use callbacks. Have mainLib pass commManager a function pointer.

Upvotes: 1

Related Questions