Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
I have created a class in the c sharp and made the dll of the class now i want to use the methods in the dll file in my VC++ project.i know how to add the *.lib file in VC++ project but how to add a *.dll file in VC++ project i don't know.I want to create the object of the class that i defined in the *.dll in my VC++ project and through the object i want to access its methods.
Posted 5-Oct-12 1:58am
Richard MacCutchan at 5-Oct-12 7:23am
I don't think you can easily use a .NET dll from a C++ program. You would be better to convert your class to C++ and add it to your project.
Ambesha at 5-Oct-12 8:35am
libraries are in the form of dll , what problem you are getting to add dll??
Tarun Batra at 5-Oct-12 8:47am
i have a dll named a.dll that i have made in c# how to add dll in project i know how to add libraries but not dll

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Tarun Batra at 5-Oct-12 9:51am
Sir i want to add a C# Dll to C++ project not an C++ lib to c# project
skydger at 5-Oct-12 10:06am
Oh, I'm sorry. In this article there is a suggestion to use COM technology. You can create COM visible components to use it in you C++ project and vise versa. When there will be a C# COM visible interfaces, you can create C++ wrapper to use them as a simple class.
Tarun Batra at 5-Oct-12 10:09am
Sorry sir i am not so much well versed can you please guide me the steps of how to use the the C# dll in VC++ projects
skydger at 5-Oct-12 10:34am
Please see links in updated solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web03 | 2.8.150302.1 | Last Updated 5 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100