vb.net 2010 compatibility - WeOnlyDo Discussion board

vb.net 2010 compatibility (General questions)

by Klinzter, Sunday, November 29, 2009, 08:01 (5472 days ago)

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

by wodDamir, Sunday, November 29, 2009, 14:54 (5472 days ago) @ Klinzter

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

by Klinzter, Sunday, November 29, 2009, 23:08 (5472 days ago) @ wodDamir

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

by wodDamir, Monday, November 30, 2009, 00:33 (5472 days ago) @ Klinzter

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

by Klinzter, Thursday, December 03, 2009, 00:50 (5469 days ago) @ wodDamir

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

by wodDamir, Thursday, December 03, 2009, 01:12 (5469 days ago) @ Klinzter

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

by Klinzter, Thursday, December 03, 2009, 01:22 (5469 days ago) @ wodDamir

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

by wodDamir, Thursday, December 03, 2009, 11:34 (5468 days ago) @ Klinzter

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

by Klinzter, Thursday, December 03, 2009, 18:35 (5468 days ago) @ wodDamir

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

by woddrazen, Thursday, December 03, 2009, 21:16 (5468 days ago) @ Klinzter

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

by Klinzter, Thursday, December 03, 2009, 23:15 (5468 days ago) @ woddrazen

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

by woddrazen, Thursday, December 03, 2009, 23:54 (5468 days ago) @ Klinzter

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

by Klinzter, Friday, December 04, 2009, 00:39 (5468 days ago) @ woddrazen

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

by woddrazen, Friday, December 04, 2009, 09:36 (5467 days ago) @ Klinzter

Klinzter,


Did you try this:

http(1).Get http://www.weonlydo.com


Drazen

Re: vb.net 2010 compatibility

by Klinzter, Friday, December 04, 2009, 14:23 (5467 days ago) @ woddrazen

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

by woddrazen, Friday, December 04, 2009, 14:46 (5467 days ago) @ Klinzter

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

by Klinzter, Saturday, December 05, 2009, 20:35 (5466 days ago) @ woddrazen

alright it is working perfectly fine..