Or I guess, I should be asking "what size should they be when using Winsock API in VB6?". I'm trying to use Winsock API, and I need to know exactly how to define the User Defined Type of WSADATA in VB6. According to winsock2.h as found at https://gist.github.com/piscisaureus/906386 the field szDescription is supposed to be a char array (what VB6 calls a Byte array), of length WSADESCRIPTION_LEN+1 (total length is 257 bytes), where WSADESCRIPTION_LEN=256. And the szSystemStatus field is a char array of length WSASYS_STATUS_LEN+1 (total length 129), where WSASYS_STATUS_LEN=128. Problem is VB6 does not like odd-number sized fields like 257 or 129, and will apply padding bytes automatically. How do I get around this problem when implementing Winsock API in VB6? Is Winsock API simply impossible to use in VB6?
↧