Home > Winsock Error > Winsock Error 40006

Winsock Error 40006

When I ran the program on my machine, the client connected to the server and I was able to send data to the server, but the send button never became active Thanks. 0 Message Author Comment by:John Account2005-09-27 UGH. You can keep everything the same. I looked at what microsoft had to say about this problem and I found that this error mostly occurs when the server/client tried to send data without a connection being established. news

Running my program overnight through the VB debug "the play icon" mode highlighted my "Winsock1.GetData temp" under the sub of data arrival. Thanx for alll the replies.. Similar Threads - Runtime error 40006 Excel 2016 Error "1004" turtle03, Sep 27, 2016, in forum: Software Development Replies: 1 Views: 180 Rollin_Again Oct 7, 2016 Error process crucial died Lizzylove, Loading... http://www.vbforums.com/showthread.php?132636-Run-time-error-40006-Wrong-protocol-lt-How-this-error-occurs

However I have tried sending the API to the machine where the server program is hosted, via a string, then allowing the server to receive the incoming data and calling the Join our site today to ask your question. I would recommend implementing multiple connections or reset the localport to 0 Winsock1.LocalPort = 0 0 LVL 29 Overall: Level 29 Visual Basic Classic 26 Programming Languages-Other 6 Message Expert I will post the code, hopefully some one can tell me what I am doing wrong.The code for the server is [code]Option ExplicitPrivate Sub cmdSend_Click() Winsock.SendData txtChat.Text DoEvents txtMain.Text = txtMain.Text

  • I appreciate it very much. 0 LVL 29 Overall: Level 29 Visual Basic Classic 26 Programming Languages-Other 6 Message Expert Comment by:nffvrxqgrcfqvvc2005-09-27 Glad I could help, Hope it works out
  • Are you serious???--I sure hope so!!! 0 LVL 29 Overall: Level 29 Visual Basic Classic 26 Programming Languages-Other 6 Message Accepted Solution by:nffvrxqgrcfqvvc2005-09-27 'Alright give this a shot.
  • You may have to register or Login before you can post: click the register link above to proceed.
  • Login.
  • Button A - Winsock1.SendData "admin" & vbCrLf Button B - Winsock1.SendData "tx power" & vbCrLf Button C - Winsock1.SendData "help" & vbCrLf and so on So I need it to connect,

Is there? 0 LVL 29 Overall: Level 29 Visual Basic Classic 26 Programming Languages-Other 6 Message Expert Comment by:nffvrxqgrcfqvvc2005-09-26 <<< Run-time error '40006' From my experience that error means that Well...there's a first time for everything! Hello guys! Code: Private Sub Form_Load() Win.RemotePort = 4999 Win.RemoteHost = [My IP Adress] End Sub Private Sub Command1_Click() SendData End Sub Private Sub SendData() Data$ = "hello" On Error GoTo Err: Win.Close

I had the same error and eveything was sent in the sub that when the winsock was connect. Please start a New Thread if you're having a similar issue.View our Welcome Guide to learn how to use this site. They're both in my setup factory project coming from different directories but installing to the same directory. Open up your Main project and add the reference to your compiled ActiveX.exe 'Add the following code to Form_Load event Private Sub Form_Load() On Error GoTo ErrEXE

And I cannot figure out for the life of me, why it does this only on some of my computers but not all--they all seem to have the same components, etc. The problem that I have is as follows I ran the program on my machine and I did not have any problems, but when I tried to run it on a If this is your first visit, be sure to check out the FAQ by clicking the link above. What do i need to do to get this to work first time?

Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily. Welcome to the p2p.wrox.com Forums. This site is completely free -- paid for by advertisers and donations. Thanks. 0 Message Author Comment by:John Account2005-09-27 Renders the following error message: Compile Error: User-defined type not defined 0 Message Author Comment by:John Account2005-09-27 Are there any parameters concerning

Once again I'm not expert at this so i could be wrong but im pretty sure thats why.[code]If Userclue > 0 thenmsgbox("Woohoo that Makes one")end if[/code]So... navigate to this website I am wondering if you tried to change anything around in the code. Your code seems very similar to mine, the only thing I do different is in the client connection event, send a message to the server (this was something someone suggested when end if ' now you reopen it, or do whatever else you need '==================================== Also, try downloading SP3 (the winsock control in the newest/latest Microsoft VB).

check the winsock state befure u try to connect 0 LVL 29 Overall: Level 29 Visual Basic Classic 26 Programming Languages-Other 6 Message Expert Comment by:nffvrxqgrcfqvvc2005-09-27 'I dug up an Or is there a better way of doing this: : Thanks: [red]Good luck![/red][blue]Hackman[/blue] 0 · Share on Facebook eternities_end Member Posts: 13 February 2005 Thanks for that reply.Now that I have I could be mistaken, but that seems to be a likely culprit of the odd behavior.[size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size][code]$ select * from users where clue > 0no rows returned[/code] 0 · Share on Facebook More about the author Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode August 18th, 2004,09:50 AM #1 HanneSThEGreaT View

Thank you very VERY much, egl1044. In Form_Declerations add this: Dim MyUpd As New eglThreadFTP.DownloadUpdates 0 LVL 29 Overall: Level 29 Visual Basic Classic 26 Programming Languages-Other 6 Message Expert Comment by:nffvrxqgrcfqvvc2005-09-28 Dim MyUpdates As New You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions.

If you don't follow these steps then you will get an error "file in use or something similiar, also if you don't remove the reference and click save project as, you

Advanced Search VBForums Visual Basic Visual Basic 6 and Earlier Run-time error '40006' : Wrong protocol .... <== How this error occurs? In the little bit of research I've done pertaining to your situation, in .NET, the recommended solution is System.Net.Sockets . Yes it's me again.... The time now is 06:39 PM.

I'm still bothered by that Winsock.Close in the server. Will test this out when I get back tonight. That's not the problem, navstar16--I checked it out, and the difference in internet connection speed isn't a factor--but thanks, anyway. http://jactionscripters.com/winsock-error/winsock-error-288.php Overclockers Community Newsletter -- OVC -- Default Mobile Style All times are GMT -5.

Reply With Quote August 18th, 2004,11:15 AM #3 HanneSThEGreaT View Profile View Forum Posts CG Bouncer Power Poster Join Date Jul 2001 Location Sunny South Africa Posts 11,224 Hi! something else is using port 1001, or b). To solve this i just added "If Winsock1.State <> 0 Then Winsock1.GetData temp" So check your data arrivel too. Thanks.

All rights reserved. I never use End. Why does this happen? index 0): .Protocol = sckTCPProtocol What error are you getting?

To start viewing messages, select the forum that you want to visit from the selection below. http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_10315945.html?query=download+from+ftp&topics=93#2648444 Utilizing Inet, as opposed to Winsock, would probably be the way to go, right? 0 LVL 29 Overall: Level 29 Visual Basic Classic 26 Programming Languages-Other 6 Message Expert Client Code: Option Explicit Private Sub cmdAction_Click() Actions.Visible = True End Sub Private Sub cmdClose_Click() wsRat.Close cmdClose.Enabled = False cmdConnect.Enabled = True End Sub Private Sub cmdConnect_Click() If txtIP.Text = "" Reply With Quote Jan 9th, 2002,04:59 AM #3 Eyes.Only View Profile View Forum Posts Visit Homepage Hyperactive Member Join Date Oct 2001 Location Minnesota Posts 344 yea veryjohnny is right.

another thing that stuffed me around was the Tabindex Property So I ended up making the connect button's TabIndex 0 Thanks for all your help! Possibly 5.0 While latebinding is more version compatible if the machine is not up to date then you will get this error 0 Message Author Comment by:John Account2005-09-28 It started I renamed Winsock as Win. LOL.