Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Using C# DLL in Visual Basic 6

Posted on 2006-11-20
2
Medium Priority
?
1,883 Views
Last Modified: 2013-11-25
I had created a dll in Visual Basic before and  I am calling this dll from my program.

I ran into some problems with the dll as it is fairly complex and it is almost impossible to debug.

If I use C# just to create the dll instead of VB, can anyone tell me how can I call the DLL created in C# from my original VB program? Would there be any effect on performance as the DLL would be created in a non-VB language?

I cant change my original pogram to C#.

Appreciate any help.

Thanks.

0
Comment
Question by:momer123
[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
  • 2
2 Comments
 
LVL 29

Accepted Solution

by:
Nightman earned 300 total points
ID: 17982283
You can register the C# assembly with COM Interop (just make sure that it has a strong name) - regasm.exe < your assembly name and path> /tlb. You then reference the type library from VB (or late bind - up to you). Under high-volume concurrency, there is a performance overhead for COM Interop, but for lower volumes it should not be all that significant.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

597 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