C++ Managed Wrapper DLL exposes unmanaged names too - help
- From: "kor" <x@y>
- Date: Sat, 23 Jul 2005 11:28:01 +0200
Have a huge c++ class library of more then 7000 classes wrapped with managed
classes using specific namespace but same class names as unmanaged.
unfortunately since .NET 2003 all unmanaged classes are visible as exported
from the wrapping dll, thus hiding names of the wrapping namespace. The
consequence is, that the C# client using the wrapping dll cant access
wrapping classes without prefixing each with the namespace - regardless if
"using wrappingNamespace" is there or not.
Have broken down testing until the simplest example provided by MS on
wrapping unmanaged classes - even that code can't overcome this with .NET
2003 - they wrap a class "sampleClass" with "sampleClass_w". Both appear to
be visible then (the unmanaged one as struct value type). If both named
"smpleClass" instead, the unmanaged one hides the managed one, the managed
one can only be accessed via "managedWrapper.sampleClass" from client
requiring (impossible) rewrite - "using managedWrapper" does not have any
influence, unmanaged being in default namespace wins!
This seams to be changed behavior from older CLR ( < 1.1) versions, which
did only export namespaces implemented in the wrapper linked. Now it seems
to export everything which it sees declared - regardless if managed or
unmanaged.
What is the hint to overcome that - renaming all the wrapper of 7000 classes
is impossible to me as it is to all the client C# apps using the wrapper? I
only want to update the wrapping DLL without touching all the clients.
Is there any method to tell the C++ compiler or linker not to export
unmanaged classes in managed DLL wrapper?
Thank you
Tomasz
.
- Prev by Date: asp page counter
- Next by Date: Invoking C++ functions that return polymorphic classes from C#
- Previous by thread: asp page counter
- Next by thread: Invoking C++ functions that return polymorphic classes from C#
- Index(es):
Relevant Pages
|
Loading