Click to See Complete Forum and Search --> : Adding dll of a vc++ class library to a c# project


kamran14march@gmail.com
December 26th, 2008, 09:19 AM
Hi i am trying to build a class library in VC++ using VS2005 the library consist of a a wraper class which wraps a class which is in a header file and inherits an MFC class, the problem is when i compile the class library it doesn't yield a dll rather it yield a .dll.intermediate.manifest when i try to add this file to references of a c# project in VS 2005 it prompts an error and doesn't add the reference can some one help me whats going wrong? how can i get a dll from VC++ class library or how can i add this .dll.intermediate.manifest file to my C# project?

I have added all the include statements necessary for MFC in StdAfx.h and the library is built successfully.

marceln
December 26th, 2008, 09:24 AM
But is the c++ dll successfully compiled? I would say not. Check the compiler output and post here the errors of you don't manage to solve them.

After you get your dll, you'll further have to create a c# wrapper class over the exported functions in the dll. You can start doing that by reading this rather nice articles: http://msdn.microsoft.com/en-us/library/04fy9ya1(VS.80).aspx , http://msdn.microsoft.com/en-us/magazine/cc164193.aspx , http://msdn.microsoft.com/en-us/library/fzhhdwae.aspx