locked
Method names not visible on COM+ RRS feed

  • Question

  • User-1670588033 posted

    Hi there!

    When I create COM DLLs with VB6, the names of the methods are always visible on the Component Services Administrative Tool.

    Now that I'm using .NET Serviced Components, they don't apear anymore, when I expand Interfaces and Methods. I wonder why...

    Maybe I have to declare some atribute to make the interfaces public?

    Thank you

    Tuesday, January 22, 2008 5:58 AM

Answers

All replies

  • User113421904 posted

    Hi skynyrd,

    There is an attribute called ComVisibleAttribute can be used to set the visibility:

    http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.comvisibleattribute.aspx

    <Assembly: ComVisibleAttribute(true)>
    Namespace example

       <ComVisibleAttribute(true)>
       Public Class class1

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, January 29, 2008 3:06 AM
  • User-1670588033 posted

    Just what I needed to know.

    Thanks!!

    Tuesday, January 29, 2008 5:23 AM
  • User-1670588033 posted

    I'm sorry but it didn't work as I expected.

    Maybe the methods are visible to COM. OK!

    But why can't I see the signature of the method on the Component Services Administrative Tool ? 

    When I expand the methods box there is just nothing on it

    When I expand the Interface box I can see the Method's name. But not the signature.

    If this was a vb6 com+, I would see that the BusinessProcess1 Method recives an Integer and returns a String

    I'm using this command to register into COM+:

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegSvcs.exe

    and this Arguments: $(TargetName)$(TargetExt)

    Thank you for your help anyway!

    Imports System.EnterpriseServices

    Imports System.Runtime.InteropServices

    Imports System.Reflection

    Namespace sn00_Services[

     

    Public Interface Isc00_Test

        Function BusinessProcess1(ByVal iVar As Integer) As String

    End Interface

     

    <ComVisibleAttribute(True)> _

    Public Class sc00_Test

    Inherits ServicedComponent

    Implements Isc00_Test

    <ComVisibleAttribute(True)> _

    Public Function BusinessProcess1(ByVal iVar As Integer) As String Implements Isc00_Test.BusinessProcess1

        Return iVar.ToString()

    End Function

    End Class

    End Namespace

    On AssemblyInfo

    <Assembly: ComVisibleAttribute(True)>

    Tuesday, January 29, 2008 7:38 AM
  • User856463781 posted

    I found the Solution.

     http://msdn.microsoft.com/en-us/library/system.componentmodel.editorbrowsableattribute.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, November 23, 2008 8:24 AM
  • User-1670588033 posted

    Wow I had lost my hopes on this one. Good job!

    Tuesday, November 25, 2008 3:56 AM