Search code examples
c++skypeskype4comskype4javaskype4py

When Skype ICallChannelManagerEvents gets fired


I am working on App to App communication using skype. My Requirement is When one skype user place Call/Video Call I wanted to use application stream to send message from One App Plugged in Skype to other App plugged in Skype.

In Separate Sample App I am able to send and receive message using Application Stream from One App to Other App but I wanted to Activate Application Stream When User place call.

Skype4COM expose these three event for ICallChannelManager

  1. ICallChannelManagerEvents::Channels
  2. ICallChannelManagerEvents::Created
  3. ICallChannelManagerEvents::Message

I have registered these three events

hr = m_pCallChannelMgr.CreateInstance(__uuidof(CallChannelManager));
hr = SinkSkypeCallChannelMgrEvents::DispEventAdvise(m_pCallChannelMgr);

hr = m_pCallChannelMgr->CreateApplication(L"");
VARIANT_BOOL flag = m_pCallChannelMgr->GetCreated();
while(true )
{
if ( VARIANT_TRUE == flag) break;
flag = m_pCallChannelMgr->GetCreated();
Sleep(1000);

}
hr = m_pCallChannelMgr->Connect(m_Skypeptr);

when m_pCallChannelMgr->CreateApplication(); is called it fires ICallChannelManagerEvents::Created event.

I am Not sure about,When Other when two event ICallChannelManagerEvents::Channels and ICallChannelManagerEvents::Message gets fired. Plz help me on this.


Solution

  • Problem Resolved when there is already a call in process and your plugin starts to hook in to Skype ICallChannelManagerEvents gets fired.