Click here to Skip to main content
15,913,218 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: URGENT..Can not change the code after deployment Pin
Bad Sector7-Feb-05 18:35
Bad Sector7-Feb-05 18:35 
Questionhow to track key buttons? Pin
chand_p4-Feb-05 11:17
chand_p4-Feb-05 11:17 
AnswerRe: how to track key buttons? Pin
Bad Sector7-Feb-05 18:38
Bad Sector7-Feb-05 18:38 
GeneralAnimated Gifs Pin
jamesbronw4-Feb-05 11:02
jamesbronw4-Feb-05 11:02 
GeneralRe: Animated Gifs Pin
duain27-Apr-05 5:21
duain27-Apr-05 5:21 
QuestionmmioInstallIOProcA not working??? Pin
[DK]KiloDunse4-Feb-05 10:01
[DK]KiloDunse4-Feb-05 10:01 
AnswerRe: mmioInstallIOProcA not working??? Pin
[DK]KiloDunse5-Feb-05 10:23
[DK]KiloDunse5-Feb-05 10:23 
GeneralAn unhandled exception of type 'System.NullReferenceException' occurred in winpcap Wrapper test.exe Pin
Delo4-Feb-05 9:04
Delo4-Feb-05 9:04 
th error is when i run the project i get "An unhandled exception of type 'System.NullReferenceException' occurred in winpcap Wrapper test.exe

Additional information: Object reference not set to an instance of an object.

-----------------------------------------------------------------------------
Option Strict Off
Public Class Form1
Inherits System.Windows.Forms.Form

Private Declare Function getAdapterNames Lib _
"rvpacket.dll" (ByVal s As String) As Short
Private Declare Function openAdapter Lib _
"rvpacket.dll" (ByVal Adapter As String) As Short
Private Declare Function checkPacketQueue Lib _
"rvpacket.dll" (ByVal Adapter As String) As Short
Private Declare Function GetQueuedPacket Lib _
"rvpacket.dll" (ByVal s As String) As Short
Private Declare Sub closeAdapter Lib _
"rvpacket.dll" (ByVal Adapter As String)
Private Const SIMULTANEOUS_READS As Short = 10
Private Const MAX_ADAPTER_LEN As Short = 512
Private Const ADAPTER_DELIMITER As String = "|"
Private Const MAX_PACKET_SIZE As Short = 10000
Private Const ERR_SUCCESS As Short = 1
Private Const ERR_ADAPTER_ID As Short = 2
Private Const ERR_INVALID_HANDLE As Short = 3
Private Const ERR_INVALID_ADAPTER As Short = 4
Private Const ERR_ALLOCATE_PACKET As Short = 5
Public adapter As String
Private Sub btnstart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnstart.Click
Dim qid As Short
Dim packetbuffer As String
Dim adapters() As String
Dim opensuccess As Short
Dim PacketQueue As Short
Dim packetlen As Short
Dim rawadapterdetails As String
Dim posdefaultadapter As Short
rawadapterdetails = Space(MAX_ADAPTER_LEN)
getAdapterNames(rawadapterdetails)
posdefaultadapter = _
rawadapterdetails.IndexOf(adapter_delimiter)
adapter = rawadapterdetails.Substring(0, posdefaultadapter)
opensuccess = openAdapter(adapter)
If opensuccess <> err_success Then
MsgBox("Unable to start. Check wincap is installed")
Exit Sub
End If
Do
PacketQueue = checkPacketQueue(adapter)
For qid = 1 To PacketQueue
packetbuffer = Space(max_packet_size)
packetlen = GetQueuedPacket(packetbuffer)
packetbuffer = packetbuffer.Substring(0, packetlen)
tbpackets.Text = tbpackets.Text & Replace _
(packetbuffer, Chr(0), " ")
tbpackets.SelectionStart = Len(tbpackets.Text)
System.Windows.Forms.Application.DoEvents()
Next
System.Windows.Forms.Application.DoEvents()
Loop
End Sub

Private Sub btnstop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnstop.Click
closeAdapter(adapter)
End Sub
End Class
GeneralRe: An unhandled exception of type 'System.NullReferenceException' occurred in winpcap Wrapper test.exe Pin
Dave Kreskowiak4-Feb-05 9:32
mveDave Kreskowiak4-Feb-05 9:32 
GeneralRe: An unhandled exception of type 'System.NullReferenceException' occurred in winpcap Wrapper test.exe Pin
Delo4-Feb-05 10:34
Delo4-Feb-05 10:34 
GeneralConvert Negative Number Pin
Harmonium4-Feb-05 8:03
Harmonium4-Feb-05 8:03 
GeneralRe: Convert Negative Number Pin
Dave Kreskowiak4-Feb-05 8:29
mveDave Kreskowiak4-Feb-05 8:29 
GeneralRe: Convert Negative Number Pin
Harmonium4-Feb-05 8:33
Harmonium4-Feb-05 8:33 
GeneralNeed help Pin
babur khan4-Feb-05 5:26
babur khan4-Feb-05 5:26 
GeneralRe: Need help Pin
Dave Kreskowiak4-Feb-05 5:54
mveDave Kreskowiak4-Feb-05 5:54 
Generalfile.exists but not accessible Pin
KreativeKai4-Feb-05 2:17
professionalKreativeKai4-Feb-05 2:17 
GeneralRe: file.exists but not accessible Pin
Dave Kreskowiak4-Feb-05 5:57
mveDave Kreskowiak4-Feb-05 5:57 
GeneralRe: file.exists but not accessible Pin
KreativeKai10-Feb-05 4:32
professionalKreativeKai10-Feb-05 4:32 
GeneralRe: Minesweeper with 3 tier Pin
Dave Kreskowiak4-Feb-05 6:00
mveDave Kreskowiak4-Feb-05 6:00 
GeneralDB Merge question from newbie Pin
pedros733-Feb-05 23:11
pedros733-Feb-05 23:11 
GeneralDB Merge question from newbie Pin
pedros733-Feb-05 23:10
pedros733-Feb-05 23:10 
GeneralRe: DB Merge question from newbie Pin
Dave Kreskowiak4-Feb-05 6:07
mveDave Kreskowiak4-Feb-05 6:07 
GeneralCrystal Reports Logon problem Pin
Alan Hallett3-Feb-05 22:38
Alan Hallett3-Feb-05 22:38 
GeneralRe: Crystal Reports Logon problem Pin
Joel Parmer8-Feb-05 7:21
Joel Parmer8-Feb-05 7:21 
GeneralRe: Crystal Reports Logon problem Pin
Alan Hallett8-Feb-05 21:27
Alan Hallett8-Feb-05 21:27 

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.