Help - Search - Members - Calendar
Full Version: .vbs versus .vb attachment issue
Skype Community > English > Development, Betas and Skype Garage > Skype Public API
Sjsweng
Hi,

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 smile.png

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
skypesync
Check the http://forum.skype.com/index.php?showtopic=112202 thread. Look like you have to listen on AttachmentStatus event and reattach when attachment status is apiAttachAvailable.
TheUberOverlord
QUOTE (Sjsweng @ Sun Mar 30 2008, 01:14)
Go to the original post
Hi,

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 smile.png

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


Please see this example:

http://share.skype.com/sites/devzone/2006/...r_skype4co.html

Bottom line avoid using TRUE in the initial attach. Use False so that you do NOT time out and don't start executing code until you receive an attached = success event
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.