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
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
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
WOW how did I not see that!
That works in .NET also?
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
Bob
ASKER
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
Bob
ASKER
Problem solved I believe...as soon as I get confirmation Ill award points anyway
Any objections to a point split between davehunt00 and TheLearnedOne?
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
ASKER