Thanks to the help of Microsoft official forums for developers, I managed to get the answer or here (for direct link to official documentation).
The default encoding for Microsoft Winsock Control 6.0 in VB6 is 'Ansi'.
This is important to know if you are converting from VB6 to VB.NET where you get to set the encoding to others and if your previous application is made with Winsock Control 6.0 (VB6), you had better set it as 'Ansi' (system.text.encoding.default), otherwise, your application may not work as it supposed to be. This is especially true if you are dealing with firmware.
To know the difference between Unicode and Ansi ? Check out here.
Unicode represents each char with 2 bytes while ANSI is 1 byte.
And doing socket in VB.NET is a pain compared to using Winsock Control 6.0 (VB6). You have to deal with lower level stuffs, but there are reasons for it. We will get to this in the coming posts.
In the mean time, the best sample codes that works best for socket VB.NET is this one. Alternatively, you can try out Chilkat socket which I have tested and works well. Check out the API documentation.
The default encoding for Microsoft Winsock Control 6.0 in VB6 is 'Ansi'.
This is important to know if you are converting from VB6 to VB.NET where you get to set the encoding to others and if your previous application is made with Winsock Control 6.0 (VB6), you had better set it as 'Ansi' (system.text.encoding.default), otherwise, your application may not work as it supposed to be. This is especially true if you are dealing with firmware.
To know the difference between Unicode and Ansi ? Check out here.
Unicode represents each char with 2 bytes while ANSI is 1 byte.
And doing socket in VB.NET is a pain compared to using Winsock Control 6.0 (VB6). You have to deal with lower level stuffs, but there are reasons for it. We will get to this in the coming posts.
In the mean time, the best sample codes that works best for socket VB.NET is this one. Alternatively, you can try out Chilkat socket which I have tested and works well. Check out the API documentation.
Comments