Home > Winsock Error > Winsock Error 40006

Winsock Error 40006

Why is this?Thanks 0 · Share on Facebook jeripedo Member Posts: 68 February 2005 Corrct me If i'm wrong but i believe your not supposed to use these prots because they Would you like to download and take a look at it? 0 LVL 29 Overall: Level 29 Visual Basic Classic 26 Programming Languages-Other 6 Message Expert Comment by:nffvrxqgrcfqvvc2005-09-26 Sure. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily. Does anyone know what this means and how i should correct my code? navigate here

I created a small chat program using WinSock. But for some reason it does not occur any one have any idea as to why this happens. this means you should stick tot he higher ports because these aren't really reserved Persay. You need to call the Connect method, then wait until the Winsock.State changes to sckConnected, or until the Winsock_Connect() event fires.

etc..."? Newer Than: Search this thread only Search this forum only Display results as threads Useful Searches Recent Posts More... Could it be because of a firewall? Reply With Quote August 18th, 2004,12:08 PM #5 cjard View Profile View Forum Posts Elite Member Power Poster Join Date Oct 2003 Location .NET2.0 / VS2005 Developer Posts 7,104 would that

the winsock could disconnect before you get your data. Ex...Winsock1.SendData txtText1.text.... Thanks. 0 Message Author Comment by:John Account2005-09-27 UGH. 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

Categories 141.9K All Categories104.9K Programming Languages 6.4K Assembler Developer 1.9K Basic 39.9K C and C++ 4.3K C# 7.9K Delphi and Kylix 4 Haskell 9.6K Java 4.1K Pascal 1.3K Perl 2K PHP But they are not before they are compiled into a setup exe. 0 LVL 29 Overall: Level 29 Visual Basic Classic 26 Programming Languages-Other 6 Message Expert Comment by:nffvrxqgrcfqvvc2005-09-28 You Join our site today to ask your question. Since we are creating a thread microsoft recommends that you end all applications with End and not Unload Me 0 Message Author Comment by:John Account2005-09-27 Thanks for sharing.

Please help! 0 Question by:souldigital Facebook Twitter LinkedIn Google LVL 17 Best Solution byZhaolai Now I see why you want to have all the code in one sub... Join us to comment and to customize your site experience! Posts: 336 Thanks: 0 Thanked 0 Times in 0 Posts the error 40006 is generated due to socket is not connected yet so check for connection status before using senddata method So I made a small chat program.

Advanced Search Forum Visual Basic Programming Visual Basic 6.0 Programming Error 40006 wrong protocol or connection state.... 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 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). This way you can run both progams in the development / debug environment and identify where they're getting a problem.

User Name Remember Me? http://discusswire.com/winsock-error/winsock-error-28.html Thanks!--but I got to run out right now to pick up my baby son at day care. HannesTheReleivedAndHappy All my Articles Hannes Reply With Quote August 19th, 2004,06:46 AM #10 jp140768 View Profile View Forum Posts Member + Join Date Jun 2002 Location Clane, Ireland Posts 766 MenuExperts Exchange Browse BackBrowse Topics Open Questions Open Projects Solutions Members Articles Videos Courses Contribute Products BackProducts Gigs Live Courses Vendor Services Groups Careers Store Headlines Website Testing Ask a Question

  • IF you could show the whole source I'd be more than happy to track down the problem for you.
  • The program works fine when I test it on my local machine but when I try to connect to a remote machine I end up with a run time error 40006.
  • If this is your first visit, be sure to check out the FAQ by clicking the link above.

However i get the following error: Run-time error '40006' Wrong protocol or connection state for the requested transaction or request. Do you need to have the following property set for the inital socket (i.e. However Remove Dim MyUpdates As DownloadUpdates from form declerations section also remote Set MyUpdates = New DownloadUpdates from Form_Load and replace it with the code below. his comment is here The Connect method in Visual Basic is asynchronous and is more like a request to connect to the Winsock port.

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. Advertisements do not imply our endorsement of that product or service. Covered by US Patent.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions.

I can literally click connect (Button 1) then send a command (Button 2) with no delay and it works fine. 0 LVL 17 Overall: Level 17 Visual Basic Classic 7 However... thanx for the reply! Thanks.

Guess what it, works! This is a only guess - I am to just starting with winsock. All Rights Reserved. weblink I am getting runtime error 40006, i am guessing the connection is not properly established?

you need to just add a temp Public Variable to the ActiveX.exe so open it up and add this public variable to DownloadUpdates.cls Public rDownloadUpdates As String OK. 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. In your setup program have you made sure that MyDownloader.exe is in the same location as your main Executable that contains the reference to MyDownloader.exe? 0 Message Author Comment by:John I'm stuck big time, egl1044.

Get 1:1 Help Now Advertise Here Enjoyed your answer? Password Reminder Password Register Register | FAQ | Members List | Calendar | Today's Posts | Search Beginning VB 6 For coders who are new to Visual Basic, working in VB Short URL to this thread: https://techguy.org/334008 Log in with Facebook Log in with Twitter Log in with Google Your name or email address: Do you already have an account? First Name Please enter a first name Last Name Please enter a last name Email We will never share this with anyone.

Contact Us - Wrox - Privacy Statement - Top Powered by vBulletin Copyright ©2000 - 2016, Jelsoft Enterprises Ltd. 2013 John Wiley & Sons, Inc. Join Now For immediate help use Live now! One tip I'll give you is to make your Winsock control a control array by setting it's Index = 0. Join our community for more solutions or to ask questions.