using managed dll in c# project

  • Thread starter Thread starter Steven Cool
  • Start date Start date
S

Steven Cool

Hi,

DA PROBLEM:

Once I wrote a c++ dll. I wanted to use that dll in my new c# project,
so I compiled it with the CLR option. The compilation was ok.
Like I said, I wanted to use the dll (with several classes in it), in
my c# project. I added the reference to my c# project. But still I
can't use the classes. Do I need to use Dllimport?.
When I look at the object browser, i can see all the classes but there
are no methods.

DA SOLUTION

don't know, thats why I'm here...

Thank U
 
Steven,

What is known as a class in standard C++ is known as a __nogc class in
Managed Extensions. (Managed Extensions is C++ with the CLR option.)
Managed Extensions supports two kinds of classes: __nogc classes and
__gc classes. You can only use __gc classes in a C# project.

You'll have to read up on Managed Extensions in the MSDN Library. The
documentation explains how you can create __gc classes based on your
existing __nogc classes.

Good luck!

Bart Jacobs
 
Dank u Bart voor de informatie

mvg

Steven

Bart Jacobs said:
Steven,

What is known as a class in standard C++ is known as a __nogc class in
Managed Extensions. (Managed Extensions is C++ with the CLR option.)
Managed Extensions supports two kinds of classes: __nogc classes and
__gc classes. You can only use __gc classes in a C# project.

You'll have to read up on Managed Extensions in the MSDN Library. The
documentation explains how you can create __gc classes based on your
existing __nogc classes.

Good luck!

Bart Jacobs
 
Back
Top