Solved

Using a vb6 dll-VERY EASY QUESTION

Posted on 2006-06-27
9
206 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.Net - KeyPress Event 4 38
VB.Net Report Printing Issue 3 54
Help with converting xml file to excel using VB.NET 3 25
Complex SQL statement in VB.NET 7 31
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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

828 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