Groups | Blog | Home
all groups > visual c libraries > september 2004 >

visual c libraries : Hiding objects in MC++



Wild Wind
9/18/2004 3:40:06 AM
Hi,

I have a mixed dll which exposes some managed classes
which themselves *internally* make use of some
standard c++ library templates (like string and exception).

The problem I'm having is that when I reference the dll
in my VB.NET project, it seems to have brought along
these templates and exposed them in the VB.NET project.

This is leading to all sorts of naming collisions,
especially between the standard c++ library exception
class and the System.Exception class. I am now forced
to fully qualify each instance of System.Exception,
even though I have the statement

Imports System

at the top of my vb source file.

Is there a way I can prevent these templates from
being exposed showing up in Object browser so that
they don't cause these collisions? Or is there another
way I can handle this situation?

TIA,

--
Akin

aknak at aksoto dot idps dot co dot uk

Ronald Laeremans [MSFT]
9/18/2004 1:48:02 PM
Hi Akin,

Take a look at the following link which describes the issue and solution:
http://support.microsoft.com/default.aspx?scid=kb;en-us;822330

Ronald Laeremans
Visual C++ team

[quoted text, click to view]

Ronald Laeremans [MSFT]
9/19/2004 12:07:08 PM
Note that we have a more fundamental solution in Whidbey by allowing the
"private" (also the default) and the "public" keywords on non-CLR types like
classes and structs so you have granular control over what you want to
expose.

Thanks!

Ronald

[quoted text, click to view]

Wild Wind
9/19/2004 7:50:43 PM
Hi Ronald,

Thanks for the info - that seems to have worked.

Cheers,

Akin

[quoted text, click to view]


AddThis Social Bookmark Button