Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 13th, 2006, 2:55 AM   #1
Steiner
Newbie
 
Steiner's Avatar
 
Join Date: Jan 2006
Posts: 13
Rep Power: 0 Steiner is on a distinguished road
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??
Steiner is offline   Reply With Quote
Old Aug 13th, 2006, 8:40 AM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 8 Ooble is on a distinguished road
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?
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Aug 13th, 2006, 1:34 PM   #3
Steiner
Newbie
 
Steiner's Avatar
 
Join Date: Jan 2006
Posts: 13
Rep Power: 0 Steiner is on a distinguished road
VBPCAPAPI_v1.bas is the one in the "test" pogram that came with VBPCAP and it's listed as a module
Steiner is offline   Reply With Quote
Old Aug 13th, 2006, 5:25 PM   #4
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 8 Ooble is on a distinguished road
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?
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Aug 14th, 2006, 2:34 AM   #5
Steiner
Newbie
 
Steiner's Avatar
 
Join Date: Jan 2006
Posts: 13
Rep Power: 0 Steiner is on a distinguished road
that part was already in the module, do I have to change the references or components or something?
Steiner is offline   Reply With Quote
Old Aug 14th, 2006, 5:05 AM   #6
john Wesley
Hobbyist Programmer
 
john Wesley's Avatar
 
Join Date: May 2006
Location: United Kingdom
Posts: 119
Rep Power: 3 john Wesley is on a distinguished road
Send a message via MSN to john Wesley Send a message via Yahoo to john Wesley
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..
john Wesley is offline   Reply With Quote
Old Aug 14th, 2006, 6:03 PM   #7
Steiner
Newbie
 
Steiner's Avatar
 
Join Date: Jan 2006
Posts: 13
Rep Power: 0 Steiner is on a distinguished road
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
thanks
Steiner is offline   Reply With Quote
Old Aug 15th, 2006, 7:11 AM   #8
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 8 Ooble is on a distinguished road
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.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:33 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC