Home > Runtime Error > Runtime Error 40006 Winsock

Runtime Error 40006 Winsock

JP Please remember to rate all postings. i didnt even know ocforums had a programming section yeah as Krieger said.. JP Please remember to rate all postings. that it is blocked by a firewall. Source

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 That's the simplest way to allow multiple clients.Here is the most trivial Client I can think of:[code]Private Sub Form_Load() Winsock1.RemoteHost = "localhost" Winsock1.RemotePort = 80 Call Winsock1.Connect End SubPrivate Sub Winsock1_Connect() PS. 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.

something else is using port 1001, or b). I so how do i make it ask for the users permission to grant access for the required port? This may shed some light on your situation.

Advanced Search VBForums Visual Basic Visual Basic 6 and Earlier Run-time error '40006' : Wrong protocol .... <== How this error occurs? Similar Threads - Runtime error 40006 Excel 2016 Error "1004" turtle03, Sep 27, 2016, in forum: Software Development Replies: 1 Views: 165 Rollin_Again Oct 7, 2016 Error process crucial died Lizzylove, And set timer to run every 5 minute. Join the community of 500,000 technology professionals and ask your questions.

something else is using port 1001, or b). Code Code: Win.SendData "block" Error Code: Run-Time Error 40006 - Wrong protocol or connection state for the requested tranaction or request. First Name Please enter a first name Last Name Please enter a last name Email We will never share this with anyone. https://forums.techguy.org/threads/runtime-error-40006-with-winsock-in-vb6.334008/ It then sends a brief message to the client so the client knows the server is ready. : What does the "call" do?

Thank you very VERY much, egl1044. Forum New Posts FAQ Calendar Forum Actions Mark Forums Read Quick Links Today's Posts View Site Leaders What's New? I'm not having any luck here at all. I had the same error and eveything was sent in the sub that when the winsock was connect.

Register Lost Password? 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. Dev Shed Forums Navigation Forums Tools Newsletter Signup Articles Help Devshed Network Developer Shed ASP Free Dev Shed Dev Articles Dev Hardware Tutorialized SEO Chat Scripts Codewalkers Web Hosters Dev Mechanic Zauberis BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 1 July 7th, 2006 09:40 AM Setting Runtime DB connection from JSP ssivakumar76 BOOK: Beginning Java 2, JDK 5 Edition 0

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://temprobots.com/runtime-error/runtime-error-40006-wrong-protocol.php Yes, in my setup app, the activex exe and main exe are in the same location. Why? :( wd40bomber703-24-2008, 02:34 PMPost the code. Run-time error '40006' : Wrong protocol or connection state for the requested transaction or request.

Tech Support Guy is completely free -- paid for by advertisers and donations. Thanks. 0 Message Author Comment by:John Account2005-09-27 UGH. 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 have a peek here If you're not already familiar with forums, watch our Welcome Guide to get started.

I so how do i make it ask for the users permission to grant access for the required port? Could it be because of a firewall? UpdateCheck = MyUpdates.ReadNewsFile("http://www.geocities.com/egl1044/news.txt") Caption = UpdateCheck 'If they match then download the file.

Thanks, egl1044...for a most useful & educational experience. 0 Featured Post How to run any project with ease Promoted by Quip, Inc Manage projects of all sizes how you want.

As a guest, you can read any forum posting. 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 This will download using API letting your application responsive since its all done in a different thread. :) FIRST : 'Download the Updater ActiveX.exe located below: http://www.geocities.com/egl1044/UpdaterActiveXexe.zip NEXT : 'Start up Stay logged in Sign up now!

mars122003-24-2008, 04:48 PMoh, this is my "click to connect" button code: Private Sub cmdCon_Click() If Sock.state = sckClosed Then Sock.RemoteHost = txtIP.Text Sock.RemotePort = txtPort.Text Sock.LocalPort = 0 Sock.Protocol = sckTCPProtocol Form_Load then ends and this code is not called again until the form is loaded again.[code]: Private Sub Winsock_ConnectionRequest(ByVal RequestID As Long): : Winsock.Close: Winsock.Accept RequestID: : End Sub[/code]Perhaps I'm mistaken, However, if I remember correctly the server should be listening for the client, you use the property winsock.listen. Check This Out Join Now For immediate help use Live now!

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 Maybe there's something messed up with this computer. 0 LVL 29 Overall: Level 29 Visual Basic Classic 26 Programming Languages-Other 6 Message Expert Comment by:nffvrxqgrcfqvvc2005-09-27 Dont attempt to Set MyUpdates Last edited by aaronbromley; April 3rd, 2007 at 06:10 AM. You sure do know your stuff! 0 LVL 29 Overall: Level 29 Visual Basic Classic 26 Programming Languages-Other 6 Message Expert Comment by:nffvrxqgrcfqvvc2005-10-02 Hi, JohnLucio, You might want to consider