I am currently using SendMessage in a series of activities that must be carried out in sequence. However, using SendMessage will result in a "hanging" state since it will complete the activities before returning control to the caller.
As I I need to perform an activity on the completion of another, the PostMessage method will result in the triggering of a later activity without waiting for the completion of a required activity.
SendMessageCallback seems to be able to solve my problem but does anyone has an example on this (e.g. how to call as well as how to declare and use the callback function) Or is there any better alternative such as hooks