Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2005

Tip: Looking for answers? Try searching our database.

Exporting a Type (Class) from a managed dll (assembly)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
paul - 23 Mar 2005 10:14 GMT
I am exporting a class from a managed dll created in Visual C++ 2005
Express.

In A.h header file I have
// A.h
public ref class A {};

In the same module, I create a new class to be exported which will use
A as its base class.

In B.h header file.
//B.h
#include "A.h"
public ref class B : public A {};

I then try to use class B in the same module in another class called C.

In C.h header file.
//C.h
#include "B.h"
public ref class C { B^ b; };

When trying to compile the above set of classes, I get error C3213: B:
cannot export the derived type with an assembly private base type 'A'

Thanks for the response beforehand!
paul - 25 Mar 2005 09:57 GMT
In A.h header file If I change public to private (non exportable)
// A.h
private ref class A {};

I get error C3213: B:
cannot export the derived type with an assembly private base type 'A'
Which is the error I should get.

In A.h header file When I change the private to public (exportable)
// A.h
private ref class A {};

I still get error C3213: B:
cannot export the derived type with an assembly private base type 'A'
This is not the error I should be getting

Hope some one has come across this kind of issue before, and can give
me a hint on how to resolve this problem

paul
paul - 25 Mar 2005 18:17 GMT
I have made a correction to the previous post

In A.h header file If I change public to private (non exportable)
// A.h
private ref class A {};

I get error C3213: B:
cannot export the derived type with an assembly private base type 'A'

Which is the error I should get.

In A.h header file When I change the private to public (exportable)
// A.h
public ref class A {};     // not private ref class A {};

I get error C3213: B:
cannot export the derived type with an assembly private base type 'A'

This is not the error I should be getting

Hope some one has come across this kind of issue before, and can give
me a hint on how to resolve this problem

paul

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.