Link to home
Start Free TrialLog in
Avatar of justchat_1
justchat_1

asked on

Using a vb6 dll-VERY EASY QUESTION

I am trying to refernce a vb6 dll from vb.net.
It should be very easy to do from what I have read but I know vb6 not .NET

I tried:
Dim NewIM As New IMDLL.Sniffer
NewIM.adapter = 1
NewIM.startTrap = 1

and it gives no compile errors however the event that is supposed to be raised is not occuring
Avatar of justchat_1
justchat_1

ASKER

Will award up to 100 points for a simple answer or link, more if it is more complicated then I thought...
I think all you need to do is make sure you're referencing the DLL in the project.

So, right-click on the Project and select Add Reference.  You can browse the DLL (which you should put in \bin) to select.

Try that and see if that helps.
Dave
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
WOW how did I not see that!
That works in .NET also?
Yep.  There is still some left over from VB6 days, heck even QW-BASIC days with the Goto <label>.

Bob
Unfortunatly not the problem...I am trying to pass back a struct with three strings.  I read something about needing to include me.hwnd in the function call?  Are there any differences I should know about when coding in vb6 for vb.NET
Could you give me some kind of picture of what you just described?  Not enough information there to make any sense of what you mean.

Bob
Problem solved I believe...as soon as I get confirmation Ill award points anyway

Any objections to a point split between davehunt00 and TheLearnedOne?
Should go to Bob, unless you actually needed my comment. He helped out more.  Dave