<StructLayout(LayoutKind.Sequential)> _
Public Structure WSADATA
Public wVersion As Short
Dim wHighVersion As Short
<MarshalAs(UnmanagedType.ByValTStr, sizeConst:=WSADESCRIPTION_LEN +
1)> _
Public szDescription As String
<MarshalAs(UnmanagedType.ByValTStr, sizeConst:=WSADESCRIPTION_LEN +
1)> _
Public szSystemStatus As String
Public iMaxSockets As Integer
Public iMaxUdpDg As Integer
Public lpVenderInfo As IntPtr
End Structure
Private Declare Function WSAStartup Lib "wsock32" (ByVal
wVersionRequired As Integer, ByRef lpWSADATA As WSADATA) As Integer
In your codes you can use it as:
Dim Data As New WSADATA
If WSAStartup(&H201, Data) = 0 Then
'Codes of your logic
End If
///
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.