I have been in research of Winsock and its working under VB 6 for the past few weeks. I have learnt a lot! Special thanks for VBForums and its Active Members.
I would like to share Winsock Class Implementation API which I have modified. The credit goes to the original Authors who have spent their time making our works easier.
Why Do you need a Winsock Class API? (Winsock Control vs Winsock API)
1. Winsock Control is an external dependency which is required in each and every system in which your Project is meant to be deployed.
2. Winsock Control has a Memory Leak which has been described in the Microsoft Knowledge Based Articles.
3. Encapsulation of Winsock API can ensure better working of your Applications.
4. It also eliminates the compatibility issues with different version of OCX libraries.
However, you cannot directly use Winsock API for Array Programming. You need to create User Control and use the control on the form.
CSocketMaster VB6 Class API
This is a good stable version of CSocketManger that I have found. It comes with a CSocketMaster class module and CSocketManager module which is fully compatible and ready to use under VB6 Platform. Read the
However this version of CSocketManager has few problems with Windows Vista. There are certain problems you encounter when you try to establish a Remote Connection. You are returned with a Socket Error (Socket State 9). I have fixed this error and this makes CSocketManager fully compatible with Windows Vista.
You can find CSocketManager_Vista file additionally in the attached documents. This Class Module has certain modifications. You can search for iProgrammer in the Class Code. I have included certain comments and tags which will help you figure out.
Unisock
This is a Robust Class API Implementation of Winsock which is readily compatible with Windows Vista. I have encountered a few Crashing problems while using this Class Module. You need to take special care about Opening and Closing of Sockets when you use this Class Module. Credits to Merri for his outstanding work.