Solved

Using a vb6 dll-VERY EASY QUESTION

Posted on 2006-06-27
9
207 Views
Last Modified: 2010-04-23
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
Comment
Question by:justchat_1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 9

Author Comment

by:justchat_1
ID: 16996297
Will award up to 100 points for a simple answer or link, more if it is more complicated then I thought...
0
 
LVL 4

Expert Comment

by:davehunt00
ID: 16996545
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
 
LVL 96

Accepted Solution

by:
Bob Learned earned 30 total points
ID: 16997395
Does this work?

Dim WithEvents NewIM As New IMDLL.Sniffer

Bob
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 9

Author Comment

by:justchat_1
ID: 16998191
WOW how did I not see that!
That works in .NET also?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17000138
Yep.  There is still some left over from VB6 days, heck even QW-BASIC days with the Goto <label>.

Bob
0
 
LVL 9

Author Comment

by:justchat_1
ID: 17006292
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
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17008554
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
 
LVL 9

Author Comment

by:justchat_1
ID: 17018792
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
 
LVL 4

Expert Comment

by:davehunt00
ID: 17018905
Should go to Bob, unless you actually needed my comment. He helped out more.  Dave
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question