I am making my first Skype app that can simply message a user but when I debug I get a exception that crashes my app. Here is the code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using skype_app;
using SKYPE4COMLib;
namespace skype_app
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
var oskype = new SKYPE4COMLib.Skype();
oskype.PlaceCall(textBox1.Text);
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
var oskype = new SKYPE4COMLib.Skype();
oskype.SendMessage(textBox1.Text, textBox2.Text);
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
}
}
i have use some extra references references list:
- Microsoft.Csharp
- SKYPE4COMlib
- SkypeDialoglib
- system
- system.core
- system.data
- system.data.DataSetEXTensions
- system.deployment
- system drawing
- System.Windows.forms
- System.xml.linq
Here is the exception i get: System.RUntime.InteropServices.ComException : {"connection refused"} So I guess my main question is why does my connection get refused when Skype dose not even open the dialogue asking if I want to allow the connection ?