Accessing a dll

  • Thread starter Thread starter Fred
  • Start date Start date
F

Fred

Hi,

I have created a DLL in C++ .NET and am trying to use
that in my C# project.

The DLL compiles in C++ and I am able to add a reference
to it in the solution explorer.But when I view it in the
object browser i dont see any methods

I am using the following MSDN link to create the DLL

http://support.microsoft.com/default.aspx?scid=kb;EN-
US;189133

I have also tried using dllimport but it says that the
entry point is not defined

what am i doing wrong
 
This link you provided is for exposing old C methods to .Net, via a Type
library...

If you've written the DLL in C++.Net from scratch, then this is the very
long way around the problem.

An easier way would be to create an ATL project, then from there, add a
class to the project, which is a ATL object. You can then instatiate this
object with methods etc that you need. Once it's built, you'll find it as a
COM object when referencing it from your c# application.

Hope that helps.
Dan.
 
Dear Dan,

Thanks for the quick reply, I started out as a java
programmer so I have no knowledge of ATL at all. I
would appreciate if you could send me a sample or any
links

Also I would appreciate if some one could send me some
links as to how to export C functions to .NET

Thanks in advance

Fred
 
Back
Top