Use a VB.NET Class Library in C++.NET 
Author Message
 Use a VB.NET Class Library in C++.NET

I am very familiar with the VC6.0 compiler and before .NET was able to
import my VB dlls without any problems.

However, I now have created a Com library using VB.NET and it seems to
be successully registered.

I have run the regasm.exe with the /tlb:???.tlb and have produced the
*.tlb file.  However, my public methods within the class do not seem
to be exporting.

Has anyone got a good example of a VB.NET class library being utilized
within a C++.NET MFC application.

The class library that I created in VB.NET works just fine when I add
a reference to the object in my C# application.  Just have no success
in the C++.NET area.

Any help would be greatly appreciated.

Thanks

James D. Lawrence



Mon, 16 Aug 2004 08:51:49 GMT  
 Use a VB.NET Class Library in C++.NET
You need to declare a interface and implement it in the class that you
wants to export to the unmanaged client. And in the client use the
Inferface to call the methods in the class. The code can looks like:

Interface ICar
    Sub Start()
End Interface

Class GM
    Implements ICar

    Sub Start() Implements ICar.Start
        MsgBox("Starts to run")
    End Sub
End Class

This posting is provided "AS IS" with no warranties, and confers no rights.
"Got .Net?  http://www.gotdotnet.com".  



Tue, 17 Aug 2004 09:42:55 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Debug VB.NET DLL(Class Library) from ASP.NET page

2. ADO.NET with ASP.NET using VB.NET

3. Accessing vb.net class from non.vb.net apps

4. How to add tooltip for class library in VB.Net

5. Class Libraries in VB.Net Standard

6. VB.net class library

7. VB.net Standard and Class Libraries

8. Creating class library with vb .net standard

9. VB.Net, Classes and ADO.Net guidelines???

10. Find good book about using CR.NET with VS.NET and .NET Framework

11. question about using vb.net's Web.Mail class

12. Looking for a free FTP class library for .NET

 

 
Powered by phpBB® Forum Software