Solved

Using a vb6 dll-VERY EASY QUESTION

Posted on 2006-06-27
9
204 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
  • 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
 
LVL 9

Author Comment

by:justchat_1
ID: 16998191
WOW how did I not see that!
That works in .NET also?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now