471,594 Members | 1,742 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,594 software developers and data experts.

using managed dll in c# project

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
Nov 17 '05 #1
2 4638
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

Steven Cool wrote:
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


Nov 17 '05 #2
Dank u Bart voor de informatie

mvg

Steven

Bart Jacobs <ba*********@student.kuleuven.ac.be> wrote in message news:<10***************@seven.kulnet.kuleuven.ac.b e>...
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

Steven Cool wrote:
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

Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

121 posts views Thread by typingcat | last post: by
7 posts views Thread by Kristof Thys via .NET 247 | last post: by
1 post views Thread by Steve Marsden | last post: by
2 posts views Thread by Kevin Sun | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.