joinSession Event callbacks are not fired

The console application need a Message Loop so that messages can be delivered to the correct procedure. The application needs a loop to retrieve the messages and dispatch them to the correct windows.

So I have implement this Message Loop in my console application and my console application is also working now.

Use below message loop in main function of Console Application to make it work:
bool bRet = false;
MSG msg;
while ((bRet = GetMessage(&msg, nullptr, 0, 0)) != 0)
{
if (bRet == -1)
{
// handle the error and possibly exit
}
else
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}

3 Likes