You can find many links for winsock, in VB. It is a component that you can add to your project, and contains the functions that you posted. Woka added them to a dll, but you don't have to. Search for CHAT PROGRAM, and you'll find many links. I think you would look in the Networking Forum.
But hey! You can make a form in an Active X dll. Just make it invisible
When I do that using the Winsock control and call it doing "Msgbox Form1.Winsock1.LocalIP" it just simply doesn't work at all. And when I do it with showing the form it errors "Out of Memory".
Thus why I cannot use components in DLL
I have searched and searched countless forums, websites, etc. for the last 4-5 months and have yet to find a GOOD vb6 winsock class that works and doesn't error when used in a DLL(no .exes involved) - like I stated in my first post.
Here is PINO's example. Try each project separately, so that you can connect to yourself, unless you compile on two different machines, and change the IP address on both for send/receive. 39npeople have downloaded this so far. Thanks, PINO
Check this out. How are you accessing the form? Don't try to access the form in the Active X DLL directly. Write a property or a function. I was able to get the IP from the winsock control inside active X dll.
This will be a little tricky if you're not used to Active X development, but it is doable.
Inside the class of the ActiveX DLL, I have this code:
I know the above is different from what you posted but It errors "Wrong number of arguments or invalid property assignment" on the bold.
dglienna, that is the Winsock Control and I need a Class. Thanks for trying though
That statement will error out even if it's not in the Active X control. I don't know a lot about the Winsock control, but I know a fair bit about ActiveX DLL's. If you have a working stand alone application that uses the Winsock, we should be able to help you get it ported to an ActiveX DLL.
My .dll is different than the normal vb6 behavior. I use an add-in called "vbAdvance"( http://www.vbadvance.com ) that allows vb6 to create standard Win32 DLL's that export functions - which works perfect.
But if you want to test it before posting it back to me - you will have to download and install the vbAdvance add-in. (What you do is get an .exe program developed in another language and attach your vb6 .dll to it so it loads with it, which is easy to do)
I'll attach the project to this thread in hopes that you guys can perhaps help me out a bit with my task.
You'd have to contact the author of that code. We can't support it, even if you have the source code, which I haven't even checked. I don't think it's even necessary to have 4 commands in winsock.
My .dll is different than the normal vb6 behavior. I use an add-in called "vbAdvance"( http://www.vbadvance.com ) that allows vb6 to create standard Win32 DLL's that export functions - which works perfect.
It always returns sckConnecting and doesn't do anything else (even when the server is up) and returns sckConnecting and doesnt do anything else instead of returning sckError when the server is down.
Could someone post a good test example using CSocketMaster with DataArrival, Connect, Accept, SendData, GetData, etc. ?