Help - Search - Members - Calendar
Full Version: Silent Mode Not Working
Skype Community > English > Development, Betas and Skype Garage > Skype Public API
grisu
hi everyone,

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?

Avo Nappo

This was fixed in Skype version 3.5.0.214 hotfix. The problem was that Skype4Com lib uses command identidiers to match what it sends to Skype with feedback messages. In case of slilent mode, Skype's reply did not include the command ID so the lib failed to detect that command was successful.

Anyhow, Skype upgrade should make this go away. If you want to be sure your thing works on old Skype versions tho, you could always use ICommand interface to send the silent mode command "manually".
grisu
Thx a lot for your answer Avo! I just updated Skype and now everthing works correctly.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.