![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jan 2006
Posts: 13
Rep Power: 0
![]() |
VBpcap
Visual Basic 6.0 is not allowing me to use VBPCAP1.0 in my programs I've tried every thing I can think of and I know that winpcap is installed and the VBPCAP.DLL is in the project folder and VBPCAP.BAS is attached. So when I goto run the test program provided or anyother program for that matter, I get "runtime error 49, Bad DLL Calling convention" and when I goto debug it's always on this line of script "vpGetAdapterInfo" so it's not recognizing the call to check for network devices (I think). Am I missing some obvious piece of installation or is something corrupt or any other ideas??
|
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 8
![]() |
Taking a look at the VBPCAP 1.0 beta, there are two files named VBPCAPAPI_v1.bas, and none named VBPCAP.BAS. Which one do you mean? Did you write the module yourself?
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Jan 2006
Posts: 13
Rep Power: 0
![]() |
VBPCAPAPI_v1.bas is the one in the "test" pogram that came with VBPCAP and it's listed as a module
|
|
|
|
|
|
#4 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 8
![]() |
Well, here's the definition of the function:
Public Declare Function vpGetAdapterInfo Lib "VBPCAP.DLL" (ByVal ID As Integer, ad As AdINFO) As Long Looks fine to me - anyone see a problem with it? |
|
|
|
|
|
#5 |
|
Newbie
Join Date: Jan 2006
Posts: 13
Rep Power: 0
![]() |
that part was already in the module, do I have to change the references or components or something?
|
|
|
|
|
|
#6 |
|
Hobbyist Programmer
|
Looks right to me.
Do you call it like this?, and can we see your use of it?
__________________
Mona Lisa must of had the highway blues you can tell by the way she smiles.. |
|
|
|
|
|
#7 |
|
Newbie
Join Date: Jan 2006
Posts: 13
Rep Power: 0
![]() |
does anyone know an alternative to VBPCAP that I can use to make a packet sniffer if I can't get this to work, would rawsockets work at all?
here is the script though: Dim numadapters As Long Dim i As Integer Dim d As AdINFO numadapters = VBPcapInit ' Start VBPCAP engine For i = 0 To numadapters - 1 vpGetAdapterInfo i, d 'Uncomment this and comment the line above cbadapter.AddItem d.Description Next cbadapter.ListIndex = 0 |
|
|
|
|
|
#8 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 8
![]() |
Well, the way the function works, it looks like the variables in the declaration should be ByRef, not ByVal. I can't see how the developer of the library would get something like that wrong though.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|