[StructLayout(LayoutKind.Sequential)]
public class WSAData
{
public Int16 wVersion;
public Int16 wHighVersion;
public String szDescription;
public String szSystemStatus;
public Int16 iMaxSockets;
public Int16 iMaxUdpDg;
public IntPtr lpVendorInfo;
}
Declare Function WSAData Lib "ws2_32.dll" (TODO) As TODO
None.
Used in calling WSAStartup.
Please add some!
I tried this code and found it doesn't work. I got an empty class after calling. How I solved:
1) making class a struct
2) adding MarshalAs attibute to string members in order to set the maximum length of string
Since I've done it i got a filled structure with detailed information about WinSock. Not an empty one.
Please add some!
Do you know one? Please contribute it!