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 / August 2003

Tip: Looking for answers? Try searching our database.

modules

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Perecli Manole - 26 Aug 2003 22:48 GMT
How can I expose VB.NET modules (shared classes) through a COM callable
wrapper? This works with classes but not with modules:

   <ProgId("Loconet_caca"),
ComClass("383F5F0D-ABFE-414C-B71C-E2369AA8BCCD",
"BE00CB07-54ED-4322-8075-125F3F0D2EF2",
"6444E0EF-91C5-4C4A-992A-3CE8325F1528")> Public Module Loconet

       private _s as string

       Public Property S() As String
           Get
               Return _s
           End Get
           Set(ByVal Value As String)
               _s = Value
           End Set
       End Property

   End Module
Mattias Sj?gren - 26 Aug 2003 22:59 GMT
>How can I expose VB.NET modules (shared classes) through a COM callable
>wrapper?

You can't, since Module members are implicitly Shared, and Shared
members are never exposed to COM.

Mattias

Signature

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

Perecli Manole - 27 Aug 2003 07:21 GMT
This is not true. As a test I just created a COM ActiveX DLL in VB6 and was
able to expose a public module with shared methods and properties. How can I
emulate this behavior through a COM callable wrapper?

Perry

> >How can I expose VB.NET modules (shared classes) through a COM callable
> >wrapper?
[quoted text clipped - 3 lines]
>
> Mattias
Mattias Sj?gren - 27 Aug 2003 12:00 GMT
>This is not true.

Yes it is.

>As a test I just created a COM ActiveX DLL in VB6 and was
>able to expose a public module with shared methods and properties.

VB6 didn't have the concept of Shared members (and no Shared keyword).

Mattias

Signature

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


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.