1.11M Members

Using a C# dll in VB6

 
0
 

I'm in the process of converting a complex system from VB6 and C to C#. However now I'm in a position where I need to call a C# dll from VB6 and I need it yesterday. The only solution I found was using Interop, which didnt work, and seemed to be excessively complex on the installation end. Any suggestions?

 
0
 

However now I'm in a position where I need to call a C# dll from VB6 and I need it yesterday.

That would be nice, if it were possible.

I know you can use a VB6 ActiveX component in .NET, but I really doubt you can go the other way.

I have some projects I would like to complete using some drop in .NET components in VB6, but they will not load in VB6.

 
0
 

i mad C#.net library and build it. Please some one Help me to Use this Library in to My Vb6.0 Application.
What i do for this
(1) Build the Library using csc (C#.NET) - Successful
(2) Regasm /tlb: <library.tlb> library.dll - Successful
(Note : This LIbrary have the Strong Name)
(3) Gacutil /i <library.dll> - Successful

(4) i make refrence <library.tlb> into my VB6.0 application.

result -> only class is exposing. But No Method, Property, Variable or even.

please some one help me.

 
0
 

One simple way could be (Way around instead, if you are interested)
1. Create SQLCLR in C#
2. Deploy it as a stored procedure in SQL
3. Now in vb6 just call a stored procedure and it can call your C# code.

Cheers.
Nirdesh

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article