Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/06/2007, 04:33
tecnicosht
 
Fecha de Ingreso: junio-2007
Ubicación: El mundo
Mensajes: 22
Antigüedad: 17 años, 8 meses
Puntos: 0
Exclamación Pasar programa de C a VB.NET 2005

Hola.

Necesito pasar este programilla

codeproject.com/dotnet/dotnetwinpcap.asp?df=100&forumid=15610&select=2086 475#xx2086475xx

a VB.NET 2005

No tengo mucha idea de C, me atasco realmente aquí.


if (rcvPack==null)
{
rcvPack=new dotnetWinpCap.ReceivePacket(this.ReceivePacket);
wpcap.OnReceivePacket+=rcvPack;
}

y esto no vale da error

If rcvPack Is Nothing Then
rcvPack = New dotnetWinpCap.ReceivePacket(AddressOf rcvPack)
wpcap.OnReceivePacket = wpcap.OnReceivePacket + rcvPack
End If

también me atasco en la función RecievePacket:

private void ReceivePacket(object sender, PacketHeader p, byte[] s)
{
this.pack_count++;
rtb.Focus();
rtb.Text = rtb.Text + "Content of p : \n";
rtb.Text = rtb.Text + " Caplength: " & p.Caplength & "\n";
rtb.AppendText(" Length : "+p.Length+"\n");
rtb.AppendText(" Timestamp: "+ (p.TimeStamp)+"\n");
labPacketCnt.Text=Convert.ToString(this.pack_count );
}


Alguien puede echarme un cable.

Mil gracias.