471,310 Members | 1,055 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Exported C++ class

Hi,

I have a DLL that has a C++ class exported. Is there any way that I can
use this class in a C# program? I know about the COM interop but this class
isn't a COM class. I also know about accessing functions in DLLs using the
DllImport attribute but I don't think that imports classes (or does it??).
Any help will be appreciated. Thanks!

Gene
Aug 10 '05 #1
2 1133
Gene,
I have a DLL that has a C++ class exported. Is there any way that I can
use this class in a C# program?


Not directly no. The easiest way to do it would be to write a COM or
managed wrapper in C++.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Aug 11 '05 #2
Thanks!

"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Gene,
I have a DLL that has a C++ class exported. Is there any way that I
can
use this class in a C# program?


Not directly no. The easiest way to do it would be to write a COM or
managed wrapper in C++.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Aug 11 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Mayer | last post: by
1 post views Thread by Ingo Nolden | last post: by
2 posts views Thread by Gene Daniel | last post: by
18 posts views Thread by ciccio | last post: by
4 posts views Thread by =?Utf-8?B?SmVzc2ljYQ==?= | last post: by
reply views Thread by rosydwin | 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.