Hiding structs, etc. from my .NET assembly

S

Stephen Walch

I have a Managed C++ library that uses a number of unmanaged libraries and
my implementation necessarily includes a number of external C and C++ header
files (for example STL includes and third party .h files). The resulting
assembly works, but when I look at it under VS.NET's Object Browser (and
other tools) I see tons of contants and structs from the include files that
I never intended to be part of the public interface.

One particularly glaring example is the "exception" class defined in
"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\exception"
which shows up in my assembly as a global "public sealed struct exception :
System.ValueType" in Object Browser. In VB.NET client applications this
conflicts with System.Exception and breaks existing code.

Any ideas on how to prevent this (assuming that I can not edit the header
files)?

Thanks!!!! -Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top