Using my vb.net library from COM

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MattB

    Using my vb.net library from COM

    I have a vb.net assembly I need to make available as a COM object.
    After some Googling, I found this site:
    DMXzone.com the place for all Web Designers and Developers using Dreamweaver! Here you can find tutorials, Dreamweaver extensions, plug-ins, faqs en much more!

    I followed the steps (substituting my application, class, and function
    names) and got no errors during the process.

    But now I try to access my library from vbscript, I get a "Can't create
    object" error.
    So I tried to register it with regsvr32 and get the error:
    "DllRegisterSer ver entry point not found"

    So something seems to have not gone right, but I don't know enough about COM
    to see where. Here's a little sample code from the vb.net library. If anyone
    has any ideas I'd be interested to hear them. Thanks!

    Assembly code:

    Namespace InetEZ
    Public Class Util
    Public Shared Function GetInfo()
    Return "<descrip>M y function library</descrip><versio n>.5
    Alpha</version>"
    End Function
    End Class
    End Namespace

    -------------------------------

    vbscript:

    Dim oX, x
    Set oX=createobject ("InetEZ.Uti l")
    x=oX.GetInfo("" )
    MsgBox(x)
    Set oX=Nothing


  • Ken Tucker [MVP]

    #2
    Re: Using my vb.net library from COM

    Hi,

    You need to register the class with regasm.exe to be able to use it
    with com.


    Ken
    --------------------
    "MattB" <somedudeus@yah oo.com> wrote in message
    news:2r937rF17l 3c8U1@uni-berlin.de...
    I have a vb.net assembly I need to make available as a COM object.
    After some Googling, I found this site:
    DMXzone.com the place for all Web Designers and Developers using Dreamweaver! Here you can find tutorials, Dreamweaver extensions, plug-ins, faqs en much more!

    I followed the steps (substituting my application, class, and function
    names) and got no errors during the process.

    But now I try to access my library from vbscript, I get a "Can't create
    object" error.
    So I tried to register it with regsvr32 and get the error:
    "DllRegisterSer ver entry point not found"

    So something seems to have not gone right, but I don't know enough about COM
    to see where. Here's a little sample code from the vb.net library. If anyone
    has any ideas I'd be interested to hear them. Thanks!

    Assembly code:

    Namespace InetEZ
    Public Class Util
    Public Shared Function GetInfo()
    Return "<descrip>M y function library</descrip><versio n>.5
    Alpha</version>"
    End Function
    End Class
    End Namespace

    -------------------------------

    vbscript:

    Dim oX, x
    Set oX=createobject ("InetEZ.Uti l")
    x=oX.GetInfo("" )
    MsgBox(x)
    Set oX=Nothing



    Comment

    Working...