Solved

Using C# DLL in Visual Basic 6

Posted on 2006-11-20
2
1,881 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 75 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

691 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