vb.net 2010 compatibility (General questions)
hello there,
I would like to know if wodHttpDLX is fully compatible with vb.net 2010 applications so that I download the new vb.net beta2
Re: vb.net 2010 compatibility
Hi Klintzer,
We haven't performed any extensive testing on VS 2010. However, I did perform a simple GET test, and it works like a charm.
I assume 2010 will have all the backward compatibility, so everything should work fine. If you do however experience any issues, let us know, and we will check it out.
Regards,
Damba
Re: vb.net 2010 compatibility
Hi Klintzer,
We haven't performed any extensive testing on VS 2010. However, I did perform a simple GET test, and it works like a charm.
I assume 2010 will have all the backward compatibility, so everything should work fine. If you do however experience any issues, let us know, and we will check it out.
Regards,
Damba
sounds wonderful.. can you please provide the same project with VB 2010?
Re: vb.net 2010 compatibility
Klintzer,
Please check the following example:
http://example.weonlydo.com/index.asp?did=Http+GET+-+Synchronous&lang=VBNET
The same code should work in VS 2010.
Regards,
Damba
Re: vb.net 2010 compatibility
hello, I saw your code and its working fine but I cant get these two events to work.. how can I do it?
Private Sub object_StateChange(OldState)
Private Sub object_Disconnected(ErrorCode, ErrorText)
Re: vb.net 2010 compatibility
Klintzer,
You can use following to declare those events:
[code] Private Sub http1_Disconnected(ByVal ErrorCode As Integer, ByVal ErrorText As String) Handles http1.Disconnected
End Sub
Private Sub http1_StateChange(ByVal OldState As wodHttpDLXComLib.HttpStates) Handles http1.StateChange
End Sub[/code]
Can you try something like that?
regards,
Damba
Re: vb.net 2010 compatibility
im using you first same code then I added your second sample and changed http1 into wodhttp but its not working
Re: vb.net 2010 compatibility
Klintzer,
I just tried the following:
[code] Dim WithEvents http1 As New wodHttpDLXComLib.wodHttpDLXCom
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
http1.Get( http://www.weonlydo.com )
End Sub
Private Sub http1_Disconnected(ByVal ErrorCode As Integer, ByVal ErrorText As String) Handles http1.Disconnected
Debug.Print( Disconnected )
End Sub
Private Sub http1_StateChange(ByVal OldState As wodHttpDLXComLib.HttpStates) Handles http1.StateChange
Debug.Print( State changed from & http1.StateString(OldState) & TO & http1.StateString(http1.State))
End Sub[/code]
Both events were triggered correctly. Can you verify that?
Regards,
Damba
Re: vb.net 2010 compatibility
yes that works but what im trying to do is
Dim WithEvents http1() As New wodHttpDLXComLib.wodHttpDLXCom
and arrays dont allow WithEvents
what should I do?
Re: vb.net 2010 compatibility
Klinzter,
You can use wodHttpDLX Fast Notification interfaces for that.
More help for fast notification interfaces you can find here:
http://www.weonlydo.com/HttpDLX/Help/Notifications.html
You can find here example how to create multiple instance using wodHttpDLX:
http://www.weonlydo.com/index.asp?forum=1&action=view&topic=1235406370#1235406670
Damba send example in one post.
Drazen
Re: vb.net 2010 compatibility
I understand after I saw your samples but unfortunatelly im not using VB6 im using vb.net 2010.. I would really appreciate it if I could see a vb.net sample.. thanks
Re: vb.net 2010 compatibility
Klinzter ,
Here is VB.NET sample.
Please add Implements wodHttpDLXComLib.IwodHttpNotify line by yourself and Events will be created automatically. When you copy paste that line Events will not be created.
[code]
Implements wodHttpDLXComLib.IwodHttpNotify
Dim http(5) As wodHttpDLXComLib.wodHttpDLXCom
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim i As Integer
For i = 0 To 4
http(i) = New wodHttpDLXComLib.wodHttpDLXCom
http(i).Notification = Me
Next
End Sub
Public Sub ClientCertRequired(ByVal Owner As wodHttpDLXComLib.wodHttpDLXCom) Implements wodHttpDLXComLib.IwodHttpNotify.ClientCertRequired
End Sub
Public Sub Connected(ByVal Owner As wodHttpDLXComLib.wodHttpDLXCom) Implements wodHttpDLXComLib.IwodHttpNotify.Connected
End Sub
Public Sub Disconnected(ByVal Owner As wodHttpDLXComLib.wodHttpDLXCom, ByVal ErrorCode As Integer, ByVal ErrorText As String) Implements wodHttpDLXComLib.IwodHttpNotify.Disconnected
End Sub
Public Sub Done(ByVal Owner As wodHttpDLXComLib.wodHttpDLXCom, ByVal ErrorCode As Integer, ByVal ErrorText As String) Implements wodHttpDLXComLib.IwodHttpNotify.Done
End Sub
Public Sub HeadersDone(ByVal Owner As wodHttpDLXComLib.wodHttpDLXCom) Implements wodHttpDLXComLib.IwodHttpNotify.HeadersDone
End Sub
Public Sub HostCertificate(ByVal Owner As wodHttpDLXComLib.wodHttpDLXCom, ByVal Cert As wodHttpDLXComLib.ICertificate, ByVal ErrorCode As Integer, ByVal ErrorText As String, ByRef Accept As Boolean) Implements wodHttpDLXComLib.IwodHttpNotify.HostCertificate
End Sub
Public Sub Progress(ByVal Owner As wodHttpDLXComLib.wodHttpDLXCom, ByVal Position As Integer, ByVal Total As Integer) Implements wodHttpDLXComLib.IwodHttpNotify.Progress
End Sub
Public Sub Progress64(ByVal Owner As wodHttpDLXComLib.wodHttpDLXCom, ByVal PositionLo As Integer, ByVal PositionHi As Integer, ByVal TotalLo As Integer, ByVal TotalHi As Integer) Implements wodHttpDLXComLib.IwodHttpNotify.Progress64
End Sub
Public Sub Redirect(ByVal Owner As wodHttpDLXComLib.wodHttpDLXCom, ByRef URL As String, ByRef Allow As Boolean) Implements wodHttpDLXComLib.IwodHttpNotify.Redirect
End Sub
Public Sub StateChange(ByVal Owner As wodHttpDLXComLib.wodHttpDLXCom, ByVal OldState As wodHttpDLXComLib.HttpStates) Implements wodHttpDLXComLib.IwodHttpNotify.StateChange
End Sub[/code]
Drazen
Re: vb.net 2010 compatibility
Alright I got it working now the Issue is that it doesn't include (Index As Integer)
so I cant call a function.. what shall I do?
Public Sub Disconnected(ByVal Owner As wodHttpDLXComLib.wodHttpDLXCom, ByVal ErrorCode As Integer, ByVal ErrorText As String) Implements wodHttpDLXComLib.IwodHttpNotify.Disconnected
call Parse_Data(Index)
End Sub
Private Sub Parse_Data(ByRef Index As Integer)
'my own data here
End Sub
Re: vb.net 2010 compatibility
Klinzter,
Did you try this:
http(1).Get http://www.weonlydo.com
Drazen
Re: vb.net 2010 compatibility
Klinzter,
Did you try this:
http(1).Get http://www.weonlydo.com
Drazen
yes but what I am asking here is how can I get the Index Integer from Disconnected event so that I can call other functions like
call Parse_Data(Index)
it used to work perfectly fine on VB6 but not in vb.net
Re: vb.net 2010 compatibility
Klinzter ,
You can add wodHttpDLX Tag Property in Form Load code so you know which instance fired which Event.
Here is code you need to change:
[code]Dim i As Integer
For i = 0 To 4
http(i) = New wodHttpDLXComLib.wodHttpDLXCom
http(i).Notification = Me
http(i).Tag = i 'add this line
Next[/code]
Then inside wodHttpDLX Events you can find out which instance fired Event using Owner.Tag.
Something like this:
[code]call Parse_Data(Owner.Tag)[/code]
Drazen
Re: vb.net 2010 compatibility
alright it is working perfectly fine..