i'm writing a c++ programm using the skype api. i can connect to the api, place a call, etc.. everything works fine so far.
the only missing thing is, that there should be no notifications and windows popping up. i read that putting SILENTMODE ON does extactly what i'm looking for. but everytime i try to get access or set this property my program crashes due to access violation. I don't understand why, because the pointer to the skype api is certainly not null (else the functions before wouldn't work).
Here's a part of my code:
CODE
HRESULT hr = CoInitialize(NULL);
ATLASSERT(SUCCEEDED(hr));
{
try
{
HRESULT hr = m_pSkype.CreateInstance(__uuidof(SKYPE4COMLib::Skype));
//Start event handling
DispEventAdvise(m_pSkype);
//Connect to Skype API
m_pSkype->Attach(6, VARIANT_TRUE);
//Set online status
m_pSkype->PutCurrentUserStatus(cusOnline);
//Minimize Skype window
m_pSkype->Client->Minimize();
//Get contact list
m_pFriends = m_pSkype->GetFriends();
//Set silent mode (avoid windows poping up)
m_pSkype->PutSilentMode(VARIANT_TRUE);
}
catch(...)
{
MessageBox( NULL, L"Problems in getting access to Skype",L"Error: Connection To Skype Application", MB_OK);
exit(-1);
}
I'm using Skype 3.5.0.14. Any ideas or suggestions?