Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • Last Modified:

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
0
justchat_1
Asked:
justchat_1
  • 4
  • 3
  • 2
1 Solution
 
justchat_1Author Commented:
Will award up to 100 points for a simple answer or link, more if it is more complicated then I thought...
0
 
davehunt00Commented:
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
0
 
Bob LearnedCommented:
Does this work?

Dim WithEvents NewIM As New IMDLL.Sniffer

Bob
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
justchat_1Author Commented:
WOW how did I not see that!
That works in .NET also?
0
 
Bob LearnedCommented:
Yep.  There is still some left over from VB6 days, heck even QW-BASIC days with the Goto <label>.

Bob
0
 
justchat_1Author Commented:
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
0
 
Bob LearnedCommented:
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
0
 
justchat_1Author Commented:
Problem solved I believe...as soon as I get confirmation Ill award points anyway

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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now