Home > Winsock Error > Winsock Error 40006 Wrong Protocol

Winsock Error 40006 Wrong Protocol

Contact Us - Wrox - Privacy Statement - Top Powered by vBulletin Copyright ©2000 - 2016, Jelsoft Enterprises Ltd. 2013 John Wiley & Sons, Inc. Thank you very VERY much, egl1044. i'm making progress. | Post Points: 5 < Previous Topic | Next Topic > Page 1 of 1 (3 items) | RSS Copyright 1998-2016 vbCity.com LLC 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 = "" http://pdctoday.com/winsock-error/winsock-error-40006.php

Unfortunately, it generates the following error on some computers while not on others: Run-time error '40006'; Wrong protocol or connection state for the requested transaction or request. 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 index 0): .Protocol = sckTCPProtocol What error are you getting? IF you could show the whole source I'd be more than happy to track down the problem for you. navigate here

Welcome to OCF! 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! I don't have access to the code here, so can't give definite answers but I'm 99% certain about this. C:\CamColada\MyDownloader.exe C:\CamColafa\Main.exe that contains reference to MyDownloader.exe 0 Message Author Comment by:John Account2005-09-28 They are.

I renamed Winsock as Win. Best Regards Reply With Quote Jan 9th, 2002,01:40 AM #2 veryjonny View Profile View Forum Posts PowerPoster Join Date Nov 2001 Location Trying to reach and stay in the cloud Posts Could it be because of a firewall? then close that project Now you will be able to update the activeX.exe or compile it, then you can re-open the test project and re-add the reference.

All rights reserved. Join us to comment and to customize your site experience! Search Forums Show Threads Show Posts Advanced Search Find All Thanked Posts Go to Page... http://forums.codeguru.com/showthread.php?306753-Error-40006-wrong-protocol-or-connection-state were you LISTENING or CONNECTING ?

That's not the problem, navstar16--I checked it out, and the difference in internet connection speed isn't a factor--but thanks, anyway. This method of defining functions will be contrasted with the non-default-argument of defining functions. make sure you have win.accept setup right if you are listening. No problems here, it works fine.

  • Guess what it, works!
  • Discussions Cyber Deals Vendor Discussion Forum Feedback Mod Hotline « Previous Thread | Next Thread » Forum Software Programming Tips and Tricks Visual Basic 6 Winsock - Run-time Error Posting Permissions
  • It sometimes fixes some of the stupid winsock errors. 0 Message Author Comment by:John Account2005-09-26 Thanks, cool12399, but it didn't work.
  • What error is it about?

As of May 1, an ISP/EDU email is NO longer required to access the Classifieds. http://www.overclockers.com/forums/showthread.php/304508-Visual-Basic-6-Winsock-Run-time-Error index 0): .Protocol = sckTCPProtocol What error are you getting? Here is my code for the server Code: Private Sub Form_Load() tcpClient2.RemoteHost = "Cmdupreez" tcpClient2.RemotePort = 1001 End Sub Private Sub cmdConnect_Click() tcpClient2.Connect End Sub Private Sub Form_Unload(Cancel As Integer) tcpClient2.Close Here's a compiled version of the standard.exe and activex.exe.

Did you set up your test project like I have shown above? <<this content Haven't been around lately been working on a large project. 0 LVL 17 Overall: Level 17 Visual Basic Classic 8 Programming Languages-Other 3 Message Expert Comment by:aiklamha2005-09-27 which protocol are All of the examples of the properties are in my example above. 0 Message Author Comment by:John Account2005-09-27 There's something I'm just not seeing here. Then when the client does winsock.connect, it fires off the connection request in your server program.

Running my program overnight through the VB debug "the play icon" mode highlighted my "Winsock1.GetData temp" under the sub of data arrival. Connect with top rated Experts 13 Experts available now in Live! Reply With Quote Quick Navigation Visual Basic 6 and Earlier Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums Visual Basic Visual Basic .NET VB.net CodeBank http://pdctoday.com/winsock-error/winsock-error-code-40006.php Which side is giving you the error: Client or Server?

I hate this stupid winsock. Reply With Quote Quick Navigation Programming Tips and Tricks Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums Overclockers.com Community News & Community Announcements Overclockers.com Article Thanks.

If you want to get involved, click one of these buttons!

Is it possible that a). Could it be because of a firewall? etc..."? They work here on this computer where they were created, but not on any other: http://www.camcolada.com/Updater.zip 0 LVL 29 Overall: Level 29 Visual Basic Classic 26 Programming Languages-Other 6 Message

That's not a good programmingtechnique. i didnt even know ocforums had a programming section yeah as Krieger said.. Register Lost Password? check over here View our list of code downloads.

LOL. Originally Posted by jp140768 Do you need to have the following property set for the inital socket (i.e. I'm going to try it on a few other machines...to see how it works. I've tried this as well Code: Private intMax As Long Private Sub Form_Load() intMax = 0 tcpServer(0).LocalPort = 1001 tcpServer(0).Listen End Sub Private Sub tcpServer_DataArrival _ (Index As Integer, ByVal bytesTotal

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 End. That would explain why you never get a Connect event - it appears that you're telling the server socket to close, which would make the .Accept meaningless (if not an outright Thanks.

Are you using VB6, or .NET? thanx for the reply! I'm sorry I can't be much more help, but I'll try to help as much as possible. Thanks.

I would lose my integrity. If UpdateCheck = "version 1.1.2" Then 'Connect and Download if news.txt = "version 1.1.2" 'Initiate timer if need be, lets you know when download is complete. As a guest, you can read any forum posting. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers.

Home Bookstore/E-Books P2P Programmer Forums Wrox Blogs Connect with Wrox Code Resources International IT Certifications Navigation Register Now View Active Topics View Archives View Unanswered Topics Wrox Programmer Forums This is a only guess - I am to just starting with winsock. I'm going to make 2 programs for each of the computers - one program to connect and send messages, the other just to receive the messages It all actually makes sense Here is the receiver.

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. How could I explore to find the reason caused the error? Terms of use / Privacy statement / Publisher: Lars Hagelin Programmers Heaven articles / Programmers Heaven files / Programmers Heaven uploaded content / Programmers Heaven C Sharp ebook / Operated by A ring in which the two operations are equal is {0} Produce Dürer's magic square Maximum server memory Should the sole user of a *nix system have two accounts?