任何人都可以指导我如何在 c# 中使用 skype4com 接听 Skype 电话。目前,当有来电并且运行良好但我不知道如何接听电话时,我正在生成一个事件...提前感谢您的帮助
using System.Runtime.InteropServices;
using SKYPE4COMLib;
[DllImport("winmm.dll")]
private static extern long mciSendString(string strCommand, StringBuilder strReturn, int iReturnLength, IntPtr oCallback);
skype.CallStatus += new _ISkypeEvents_CallStatusEventHandler(Skype_checkincoming);
public void Skype_checkincoming(Call call, TCallStatus status)
{
try
{
if ((call.Type == TCallType.cltIncomingP2P)
|| (call.Type == TCallType.cltIncomingPSTN))
{
if (status == TCallStatus.clsRinging)
{
}
}
}
catch (Exception e)
{
MessageBox.Show(DateTime.Now.ToLocalTime() + ": " +
"Call Status Event Fired - Failed" +
" - Exception Source: " + e.Source + " - Exception Message: " + e.Message);
}
}