Mixed C++ assembly

From: Alex (Alex_at_discussions.microsoft.com)
Date: 10/14/04


Date: Thu, 14 Oct 2004 14:39:06 -0700

Hello,
I am developing managed C++ wrapper for legacy C++ code. Here what I have
done and what kind of problem facing
Done...
1. Created managed C++ Class Library project
2. Changed settings to make it mixed assembly
3. Added existing legacy C++ files to the project as is. No code changes
were made
4. Created managed wrappers for legacy classes in separate namespace
5. Compiled OK
Problem...
In my C# test driver I can instantiate all my legacy classes. It means they
are exposed from assembly (:O) with some limitation. Equals, GetHashCode,
GetType, ToString are availiable only for consuming. Custom class's methods
are not! Object Browser shows all legacy unmanaged classes in the scope of my
assembly and all of them derived from ValueType.
Question...
How to hide all legacy classes from being exposed to the whole world? I
understand that they are useless anyway because .Net app cannot use them. But
they create so much confusion I believe.
Any suggestions are appreciated.
Thanks



Relevant Pages