C# 无法在C中使用Skype API调用#
我正在尝试通过C#中的Skype API进行调用。我只能打开Skype,但无法拨打电话。我正在寻找一些解决这个问题的建议C# 无法在C中使用Skype API调用#,c#,wpf,skype,skype4com,C#,Wpf,Skype,Skype4com,我正在尝试通过C#中的Skype API进行调用。我只能打开Skype,但无法拨打电话。我正在寻找一些解决这个问题的建议 public void MakeCall() { string PhoneName = Mike; string MyXMLFilePath = AppDomain.CurrentDomain.BaseDirectory + @"Database\ContactsData.xml"; XmlDocument MyXmlDoc = new XmlDocu
public void MakeCall()
{
string PhoneName = Mike;
string MyXMLFilePath = AppDomain.CurrentDomain.BaseDirectory + @"Database\ContactsData.xml";
XmlDocument MyXmlDoc = new XmlDocument();
MyXmlDoc.Load(MyXMLFilePath);
XmlNode RootNode = MyXmlDoc.SelectSingleNode("Users");
XmlNodeList FirstLevelNodeList = RootNode.ChildNodes;
foreach (XmlNode Node in FirstLevelNodeList)
{
XmlNode SecondLevelNode1 = Node.FirstChild;
if (SecondLevelNode1.InnerText == PhoneName)
{
XmlNode SecondLevelNode2 = Node.ChildNodes[1];
PhoneNumber = SecondLevelNode2.InnerText;
}
}
if (PhoneNumber != null)
{
call(PhoneNumber);
}
else
{
MessageBox.Show("Phone number is not available.");
}
}
public void call(string number)
{
new WebBrowser().Navigate("skype:" + number + "?call");
}
这是我使用的XML代码:
<Users>
<User>
<Name>Mike</Name>
<Number>1234</Number>
</User>
</Users>
迈克
1234
这是我运行代码后的Skype页面。
有什么提示吗?提前感谢。您可能会从这个链接中得到一些东西