News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Winsock DLL

Started by Robert Collins, January 12, 2005, 07:38:26 PM

Previous topic - Next topic

Robert Collins

I know this request is out of context for this forum (seeing as this is a MASM forum).

I just finished my first Winsock application in assembly using the wsock32.dll. It works and no problems. Now I want to try using the DLL in a Visual Basic program. I have got the function calls and the necessary other items neccessary (I transposed them from the Winsock.h file). I am able to get it to run with out any return errors except for one thing. When I get to the connect function it always returns the same error no matter what I do. I'm not 100% sure I have all the other stuff defined correctly but everything seems to be OK except when I go to do a connect. It always returns error 10014 - Bad Address. The port number and the IP address are correct but maybe somewhere in the function calls prior to doing the connect I have things wrong but I just don't know.

I was just wondering if anyone here has ever written a Winsock program in Visual Basic (I don't mean one using the VB Winsock.ocx control but an  application using the wsock32.dll) or know where I might find some VB source code.

If this resuest is inappropiate for this forum I apologize.

P1

#1
Robert,

You may wish to get into the habit of Googling before posting topics.

I Googled on "vb6 code winsock.dll api direct", and this was the first website with this code. 

http://www.andreavb.com/tip100003.html

You will need to Google for Callback code for VB6 to make anything decent in VB6.

VB6 is our company's standard programming language.  So let me know if you run into any other problems, after you try Googling for an answer.  I use the M$ Controls for stuff like this, because of coding practises here, which have some good reason for doing so.  Watch out for version problems with the winsock/wsock dlls.

Regards,  P1  :8)

John

You might also want to visit www.winsockvb.com for tutorials on using the winsock API from VB6. (VB.NET has built in networking classes)

Robert Collins

Quote from: P1 on January 12, 2005, 11:02:32 PM
You may wish to get into the habit of Googling before posting topics.

You're probably right about that but I usually go 'Googling' as an after matter because I guess what I am hoping for is a 'quickie' answer or maybe someone might even post or have a link to the exact answer I am looking for, like perhaps even a zip file with an already written example. I usually find that 'searching' gets me into the general area but not necessarly gets me the exact answer I am looking for. I have the reverse philosophy. If my posting yields no results then I go surfin' whereas you probably say that after all the searches have yield no results then post it.

Well, I thank you for that link.

   


Robert Collins

Quote from: Ghirai on January 15, 2005, 12:09:00 PM
http://planetsourcecode.com

Thanks anyway, Ghirai, but I am already a member there and it's like looking for a needle in a hay stack.

Ghirai

Yes and no, if you need the stuff really bad, i've done some VB winsock API apps (RATs actually :red) some time ago, i think i can dig them up... Let me know.
MASM32 Project/RadASM mirror - http://ghirai.com/hutch/mmi.html