Click here to Skip to main content
12,450,352 members (43,746 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C++ C C# Visual-Studio DLL , +
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 0:58am
Comments
Richard MacCutchan 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 5-Oct-12 8:35am
   
libraries are in the form of dll , what problem you are getting to add dll??
Tarun Batra 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
 
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
v2
Comments
Tarun Batra 5-Oct-12 9:51am
   
Sir i want to add a C# Dll to C++ project not an C++ lib to c# project
skydger 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 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 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160826.1 | Last Updated 5 Oct 2012
Copyright © CodeProject, 1999-2016
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