First of all Thanks to UberLord and a bunch of folks who've taken the time to put together excellent examples of using the API here.
I tried using many of the techniques I've seen to a VB 2005 application I'm playing with, and can't get the darn thing to attach, without complaining about a "Wait Timeout" exception, within the IDE or as a Released build.
I'm using Skype 3.6.0.248 and although if I use pure Visual Basic Script (.vbs), everything works as intended, but the moment I transition into .vb it stops working
Could you gurus of Skype please let me know what I may be doing wrong below, since the code looks sound to me, and should execute correctly.
Public Class Form1
Private WithEvents m_skype As SKYPE4COMLib.Skype
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim callz
m_skype = New SKYPE4COMLib.Skype()
If (m_skype.Client.IsRunning) Then
m_skype.Attach(5, True)
Set callz = m_skype.Calls() ' <<< Fails here with the following exception.
.................
System.Runtime.InteropServices.COMException was unhandled
ErrorCode=-2147220991
Message="Wait timeout."
Source="Skype4COM.Skype.1"
StackTrace:
at SKYPE4COMLib.SkypeClass.Attach(Int32 Protocol, Boolean Wait)
at MyVBSkypeApplication.Form1.Form1_Load(Object sender, EventArgs e) in Projects\MyVBSkypeApplication\MyVBSkypeApplication\Form1.vb:line 21
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
...................
Thanks,
Sjs