Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
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
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

 
Share this answer
 
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900