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 / .NET Framework / Interop / July 2006

Tip: Looking for answers? Try searching our database.

Enum not visible

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nathan - 30 Jun 2006 12:48 GMT
I have an assembly in VB.Net that has a single ComClass in it to allow
existing VB6 applications to use it.

I've recently had to upgrade it to VS 2005 and in doing so found more
classes in the assembly now appear to be visible to COM.

To counteract this I have set all .Net classes and assembly to
ComVisible(false) leaving just the ComClass visible.  This all seemed to work
without any problems but when I examined the class through the object browser
in VB6 I noticed that an enum included in the ComClass did not appear and
that methods that used the enum did not appear.

Playing around I found that I could get the enum to appear if I made the
assembly ComVisible but that led to other classes also being displayed (web
references).

Does anybody know why the enum doesn't appear when the assembly has
ComVisible(false) and is there a way to resolve the problem?
Mattias Sjögren - 30 Jun 2006 18:04 GMT
>Does anybody know why the enum doesn't appear when the assembly has
>ComVisible(false) and is there a way to resolve the problem?

Did you try putting ComVisible(True) on the enum types?

Mattias

Signature

Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Nathan - 03 Jul 2006 09:27 GMT
Friday I couldn't apply an attribute to the enum, just didn't like it.

However, this morning I tried again with a fully qualified declaration
(System.Runtime etc) and it blinkin worked.

Thanks for the feedback.

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.