Using .NET Class Libraries from VC++

Posted on 2006-06-19
Last Modified: 2010-04-17
How can i use a .NET class lib in an exsiting ActiveX code that was made using VC++?
Question by:jyotishb
LVL 11

Accepted Solution

pratap_r earned 250 total points
ID: 16935787
you need to make the .Net compatible with unmanaged code(eg, activex). Use tblexp utility for that, it creates a wraper for you.

examples here:

syntax for tblexp here

Have Fun!

Assisted Solution

deepakgupta111 earned 250 total points
ID: 16969051
One way that I have used is
Make a Bridge dll (a managed C++ DLL), which load the .Net lib in AppDomain.
Now for calling any .net lib function from your C++ module,
From C++ make a call to Bridge DLL function, which eventually makes the call to .net functions in the lib loaded in its AppDomain.

C++ Module ==> Bridge DLL ==> .net Lib

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

735 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