Click here to Skip to main content
16,008,750 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralFloat to Hex To Decimal Pin
halkettg3-Feb-05 11:49
halkettg3-Feb-05 11:49 
GeneralRe: Float to Hex To Decimal Pin
Christian Graus3-Feb-05 12:42
protectorChristian Graus3-Feb-05 12:42 
QuestionSetVersionInfo equivalent of GetVersionInfo? Pin
Zenly3-Feb-05 11:25
Zenly3-Feb-05 11:25 
AnswerRe: SetVersionInfo equivalent of GetVersionInfo? Pin
rwestgraham3-Feb-05 16:12
rwestgraham3-Feb-05 16:12 
GeneralRe: SetVersionInfo equivalent of GetVersionInfo? Pin
Zenly4-Feb-05 10:35
Zenly4-Feb-05 10:35 
GeneralRe: SetVersionInfo equivalent of GetVersionInfo? Pin
rwestgraham4-Feb-05 14:38
rwestgraham4-Feb-05 14:38 
GeneralRe: SetVersionInfo equivalent of GetVersionInfo? Pin
Zenly4-Feb-05 14:56
Zenly4-Feb-05 14:56 
Questioncan some one help me with this end of ststement Expected error Pin
Delo3-Feb-05 6:07
Delo3-Feb-05 6:07 
Dim ret_code as integer = socket.IOControl _
(SIO_RCVALL, bin, bOUT)

i get the error End of Statement Expected on the Above line of code


Imports System
Imports System.Windows.Forms
Imports System.Net.Sockets
Imports System.Net
Imports System.Threading
Imports System.Text

Public Class Form1

Inherits System.Windows.Forms.Form

Public listener As Thread

Private Sub btnstart_Click(ByVal sender As Object, _
ByVal e As System.EventArgs)
btnstart.Enabled = False
btnstop.Enabled = True
listener = New Thread(New ThreadStart(AddressOf run))
listener.Start()
End Sub

Private Sub btnstop_Click(ByVal sender As Object, _
ByVal e As System.EventArgs)
btnstart.Enabled = True
btnstop.Enabled = False
If Not listener Is Nothing Then
listener.Abort()
listener.Join()
listener = Nothing
End If
End Sub
Public Sub run()
Dim len_receive_buf As Integer = 4096
Dim len_send_buf As Integer = 4096
Dim receive_buf() As Byte = New Byte(len_receive_buf) {}
Dim send_buf() As Byte = New Byte(len_send_buf) {}
Dim cout_receive_bytes As Integer
Dim socket As Socket = New _
Socket(AddressFamily.InterNetwork, _
SocketType.Raw, ProtocolType.IP)
socket.Blocking = False
Dim iphost As IPHostEntry = _
Dns.GetHostByName(Dns.GetHostName())
socket.Bind(New _
IPEndPoint(IPAddress.Parse _
(iphost.AddressList(0).ToString()), 0))
socket.SetSocketOption(SocketOptionLevel.IP, _
SocketOptionName.HeaderIncluded, 1)
Dim bin As Byte() = New Byte() {1, 0, 0, 0}
Dim bout As Byte() = New Byte() {0, 0, 0, 0}
Dim sio_rcvall As Integer = &H98000001 _
dim ret_code as integer = socket.IOControl _
(SIO_RCVALL, bin bout)
Do
Dim ar As IAsyncResult = socket.BeginReceive _
(receive_buf, 0, _
len_receive_buf, SocketFlags.None, Nothing, Me)
cout_receive_bytes = socket.EndReceive(ar)
Receive(receive_buf, cout_receive_bytes)
Loop
End Sub
Public Sub Receive(ByVal buf As Byte(), ByVal len As Integer)
If buf(9) = 6 Then
lbpackets.Items.Add(Encoding.ASCII.GetString _
(buf).Replace(Chr(0), " "))
End If
End Sub
End Class

AnswerRe: can some one help me with this end of ststement Expected error Pin
Dave Kreskowiak3-Feb-05 8:40
mveDave Kreskowiak3-Feb-05 8:40 
GeneralRe: can some one help me with this end of ststement Expected error Pin
Delo3-Feb-05 11:31
Delo3-Feb-05 11:31 
GeneralMemory... Pin
Tim McCurdy3-Feb-05 4:04
Tim McCurdy3-Feb-05 4:04 
GeneralRe: Memory... Pin
Dave Kreskowiak3-Feb-05 5:30
mveDave Kreskowiak3-Feb-05 5:30 
GeneralRe: Memory... Pin
halhamilton16-Feb-05 9:16
halhamilton16-Feb-05 9:16 
GeneralRe: Memory... Pin
Dave Kreskowiak16-Feb-05 10:07
mveDave Kreskowiak16-Feb-05 10:07 
GeneralRe: Memory... Pin
halhamilton16-Feb-05 10:25
halhamilton16-Feb-05 10:25 
GeneralAdding description to Function Pin
nitin_ion2-Feb-05 22:03
nitin_ion2-Feb-05 22:03 
GeneralRe: Adding description to Function Pin
Just Greeky Creek3-Feb-05 2:00
Just Greeky Creek3-Feb-05 2:00 
GeneralCorrecting Re: Adding description to Function Pin
Just Greeky Creek3-Feb-05 3:06
Just Greeky Creek3-Feb-05 3:06 
GeneralRe: Adding description to Function Pin
Dave Kreskowiak3-Feb-05 4:09
mveDave Kreskowiak3-Feb-05 4:09 
Questionhow to get location on zoomed image Pin
Rizwan Bashir2-Feb-05 21:27
Rizwan Bashir2-Feb-05 21:27 
AnswerRe: how to get location on zoomed image Pin
Christian Graus3-Feb-05 10:12
protectorChristian Graus3-Feb-05 10:12 
QuestionHow to create .exe file in VB.NET Pin
preesteya2-Feb-05 19:31
preesteya2-Feb-05 19:31 
AnswerRe: How to create .exe file in VB.NET Pin
rwestgraham2-Feb-05 19:40
rwestgraham2-Feb-05 19:40 
AnswerRe: How to create .exe file in VB.NET Pin
Robert Rohde2-Feb-05 19:48
Robert Rohde2-Feb-05 19:48 
AnswerRe: How to create .exe file in VB.NET Pin
Ritesh12343-Feb-05 4:37
Ritesh12343-Feb-05 4:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.