I understand Skype API. I'm trying to learn how to programmatically call. Code:

using System; using System.Windows.Forms; using SKYPE4COMLib; using System.Threading; namespace SkypeAPI { public partial class Form1 : Form { private static Skype _skype = new Skype(); public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { if (!_skype.Client.IsRunning) { _skype.Client.Start(false, true); } _skype.Attach(); } private static void sendMessage(string user, string message) { _skype.SendMessage(user, message); } private static void spam() { foreach (User user in _skype.Friends) sendMessage(user.Handle, ""); } private static void calling() { Call call = _skype.PlaceCall("+380*********"); //мой моб } private static void christmass(object obj) { int speed = Convert.ToInt32(obj); TUserStatus[] arr = { TUserStatus.cusOnline, TUserStatus.cusAway, TUserStatus.cusDoNotDisturb }; while(true) { for (int i = 0; i < arr.Length; i++) _skype.ChangeUserStatus(arr[i]); Thread.Sleep(speed); } } private void button1_Click(object sender, EventArgs e) { Thread th = new Thread(new ParameterizedThreadStart(christmass)); th.Start(200); } private void button2_Click(object sender, EventArgs e) { calling(); } } } 

The calling() method does not work. Although first at the very first time when compiling with such code earned. Money in the account, though a bit, but there are ($ 0.71). From the very Skype call goes. What am I doing wrong?

  • And didn't this API cover up? - Pavel Mayorov
  • @PavelMayorov I do not know, but other methods work - Dmitry Shulga

1 answer 1

Microsoft strongly cut SkypeApi, so if you want to do something less serious, you need to find an old working version of Skype, for example, version 6.18.

Here is an article in which this issue is described in more detail.