.NET COM import to VB4

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

    #1

    .NET COM import to VB4

    Hi!

    I have created a simple COM class in VC# (ie "Hello World" through
    Windows.Forms.M essageBox). When I try to use it in VB4 I get an error
    saying that the server CLSID {GUID...} can not be loaded. Is it at all
    possible to use .NET COM classes in VB4?

    Best regards
    Michal Ziemski

  • Phil Wilson

    #2
    Re: .NET COM import to VB4

    There are all kinds of gotchas that you need to deal with, so you should say
    what you've tried so far. The C# class library needs registering (with
    regasm or equivalent), it pays to be explicit in the COM class about
    ComVisible, GuidAttribute, and a default constructor. Declaring an interface
    with a Guid wouldn't be a bad idea either, sio that you kniw exactly what
    your exported COM data really is. It doesn't help that the default project
    assemblyversion is 1.0.* and consequently changes on every build, but it
    really needs locking down to get your project into a stable state. When it
    gets down to the details, the interop ng would be the best for questions.
    --
    Phil Wilson [MVP Windows Installer]

    "R_O_O_K" <rook@roo.k.p l> wrote in message news:be6j7b$2s4 a$1@foka.acn.pl ...[color=blue]
    > Hi!
    >
    > I have created a simple COM class in VC# (ie "Hello World" through
    > Windows.Forms.M essageBox). When I try to use it in VB4 I get an error
    > saying that the server CLSID {GUID...} can not be loaded. Is it at all
    > possible to use .NET COM classes in VB4?
    >
    > Best regards
    > Michal Ziemski
    >[/color]


    Comment

    Working...