|
-
May 25th, 2007, 02:39 PM
#1
Thread Starter
New Member
[2005] Trouble receiving data with old component!
Hi,
I've been programming on and off for years with Vb6. I made a program once using Dart's PowerTCP tool. The tool comes with SecureTcp which allows both secure and normal tcp connections and works very similar to Mswinsck.ocx. The componet works perfectly in VB6 however I'm trying to make it work with VB 2005. I understand there are newer versions of the control designed specifically for .NET but they cost $500 bucks.
I started a project in Vb6 and used the Project Upgrade Wizard to update it to Vb 2005. This is where the trouble began...
In VB6 in order to receive incoming data this code was placed in the Receive event:
Dim sGone As String
sslGET.Receive sGone$
sRECV$ = sRECV$ & sGone$
However in VB 2005 this code does not work. I used Ethereal packet analyzer to make sure the program was connecting and making the request to the server. My request was indeed going through and data was even sent back. For some reason though I can't get the data from using sslGet.Receive.
I'm a total noob when it comes to vb 2005. I just migrated last week so this whole object oriented thing is new to me. Any help would be greatly appreciated.
Thanks in advance
-
May 26th, 2007, 12:47 AM
#2
Thread Starter
New Member
Re: [2005] Trouble receiving data with old component!
-
May 27th, 2007, 02:18 AM
#3
Re: [2005] Trouble receiving data with old component!
What is the signature of the Receive method? What happens when you call Receive?
-
May 29th, 2007, 02:31 PM
#4
Thread Starter
New Member
Re: [2005] Trouble receiving data with old component!
Receive (ByRef data as Object) as integer
I call it like this
Private Sub sslGET_ReceiveEvent(ByVal sender As Object, ByVal e As System.EventArgs) Handles sslGET.ReceiveEvent
sslGET.Receive(sGone$)
txtData.text = txtData.text & sGone$
End Sub
When I run the code txtData stays blank. I have placed a message box in the ReceiveEvent just to see if the event ever even fires. I noticed that the the message box will only show up if I place it before I call .receive(sgone$)
-
May 29th, 2007, 05:52 PM
#5
Re: [2005] Trouble receiving data with old component!
So you're saying that if you place a MessageBox.Show after the call to Receive that it's not executed? That would suggest that Receive is never returning? Does your app freeze at this point? Are you using multi-threading?
-
May 29th, 2007, 06:07 PM
#6
Thread Starter
New Member
Re: [2005] Trouble receiving data with old component!
I am not multi threading and my program doesn't freeze. I am able to click other buttons and the code in those other buttons will execute just fine. I have no clue what's going on...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|