Thanks!
CODE
using System;
using System.Threading;
using SKYPE4COMLib;
namespace Test
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class TestAPIApp
{
private static void OnCommand(Command CommandReply) {
Console.WriteLine("Command: " + CommandReply.Command);
}
private static void OnReply(Command CommandReply) {
Console.WriteLine("Reply: " + CommandReply.Reply);
}
[STAThread]
static void Main(string[] args)
{
Console.WriteLine ("Initializing Library");
SKYPE4COMLib.SkypeClass objSkype = new SkypeClass();
objSkype.Reply += new _ISkypeEvents_ReplyEventHandler(OnReply);
objSkype._ISkypeEvents_Event_Command += new _ISkypeEvents_CommandEventHandler(OnCommand);
Console.WriteLine("Sending PING");
CommandClass objCmd = new CommandClass();
objCmd.Blocking = false;
objCmd.Command = "PING";
objCmd.Id = 1;
objSkype.SendCommand(objCmd);
Console.WriteLine("Waiting for response, press Enter to quit");
while(Console.In.Peek() == 0) {
Thread.Sleep(10);
}
Console.In.Read();
}
}
}
using System.Threading;
using SKYPE4COMLib;
namespace Test
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class TestAPIApp
{
private static void OnCommand(Command CommandReply) {
Console.WriteLine("Command: " + CommandReply.Command);
}
private static void OnReply(Command CommandReply) {
Console.WriteLine("Reply: " + CommandReply.Reply);
}
[STAThread]
static void Main(string[] args)
{
Console.WriteLine ("Initializing Library");
SKYPE4COMLib.SkypeClass objSkype = new SkypeClass();
objSkype.Reply += new _ISkypeEvents_ReplyEventHandler(OnReply);
objSkype._ISkypeEvents_Event_Command += new _ISkypeEvents_CommandEventHandler(OnCommand);
Console.WriteLine("Sending PING");
CommandClass objCmd = new CommandClass();
objCmd.Blocking = false;
objCmd.Command = "PING";
objCmd.Id = 1;
objSkype.SendCommand(objCmd);
Console.WriteLine("Waiting for response, press Enter to quit");
while(Console.In.Peek() == 0) {
Thread.Sleep(10);
}
Console.In.Read();
}
}
}
Results:
[quote]Initializing Library
Sending PING
Command: PROTOCOL 5
Reply: CONNSTATUS ONLINE
Reply: CURRENTUSERHANDLE jasonterando
Reply: USERSTATUS ONLINE
Reply: PROTOCOL 5
Command: GET SKYPEVERSION
Reply: SKYPEVERSION 2.5.0.75
Command: PING
Waiting for response, press Enter to quit[/quote]
Wait for a couple of minutes, no response is returned. Other Skype response notifications appear to be received properly, and my PING command appears to be sent, so I'm stuck...