Creating a dll

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • leslie_tighe@yahoo.com

    #1

    Creating a dll

    Hello,


    I am new to Visual Studio and VB. Is it possible to create an dll with
    Visual Studio using VB .NET that can be consumed in .NET applications
    as well VB 6 and VB Script ASP apps?

    If so, which project template do I need to start with? I tired using
    the class library project, but when I try to register it with regsvr32,
    I get a message that it cannot find the entry point in to the dll.
    Would one the templates setup the code for this or do I need add some
    additional code to dll to get this to work?

    Thanks in advance.
    Leslie.

  • Herfried K. Wagner [MVP]

    #2
    Re: Creating a dll

    <leslie_tighe@y ahoo.com> schrieb:[color=blue]
    > I am new to Visual Studio and VB. Is it possible to create an dll with
    > Visual Studio using VB .NET that can be consumed in .NET applications
    > as well VB 6 and VB Script ASP apps?[/color]

    ..NET Framework Developer's Guide -- Exposing .NET Framework Components to
    COM
    <URL:http://msdn.microsoft. com/library/en-us/cpguide/html/cpconexposingne tframeworkcompo nentstocom.asp>

    Visual Basic Language Concepts -- COM Interop
    <URL:http://msdn.microsoft. com/library/en-us/vbcn7/html/vaconCOMInterop erability.asp>

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>

    Comment

    • leslie_tighe@yahoo.com

      #3
      Re: Creating a dll

      Thanks Herfried.

      A couple of dumb questions:
      - Can I use the ComClass.vb files to start these project? Its seems to
      generated the necessary entries for use with COM.
      - Do I need to run RegSvr32 on this dll to use it? becuase when I try
      it, I still get a message that it cannot find the entry point.

      Thanks for your help.

      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: Creating a dll

        <leslie_tighe@y ahoo.com> schrieb:[color=blue]
        > - Can I use the ComClass.vb files to start these project? Its seems to
        > generated the necessary entries for use with COM.[/color]

        You can use any class library project to start such a project. However,
        don't forget to tick the checkbox "Register for COM interop" in the project
        properties.
        [color=blue]
        > - Do I need to run RegSvr32 on this dll to use it? becuase when I try
        > it, I still get a message that it cannot find the entry point.[/color]

        You'll have to register the assembly using "REGASM.EXE " instead of
        "RegSvr32.e xe".

        --
        M S Herfried K. Wagner
        M V P <URL:http://dotnet.mvps.org/>
        V B <URL:http://classicvb.org/petition/>

        Comment

        • leslie_tighe@yahoo.com

          #5
          Re: Creating a dll

          Thanks Herfried.

          A couple of dumb questions:
          - Can I use the ComClass.vb files to start these project? Its seems to
          generated the necessary entries for use with COM.
          - Do I need to run RegSvr32 on this dll to use it? becuase when I try
          it, I still get a message that it cannot find the entry point.

          Thanks for your help.

          Comment

          • Herfried K. Wagner [MVP]

            #6
            Re: Creating a dll

            <leslie_tighe@y ahoo.com> schrieb:[color=blue]
            > - Can I use the ComClass.vb files to start these project? Its seems to
            > generated the necessary entries for use with COM.[/color]

            You can use any class library project to start such a project. However,
            don't forget to tick the checkbox "Register for COM interop" in the project
            properties.
            [color=blue]
            > - Do I need to run RegSvr32 on this dll to use it? becuase when I try
            > it, I still get a message that it cannot find the entry point.[/color]

            You'll have to register the assembly using "REGASM.EXE " instead of
            "RegSvr32.e xe".

            --
            M S Herfried K. Wagner
            M V P <URL:http://dotnet.mvps.org/>
            V B <URL:http://classicvb.org/petition/>

            Comment

            Working...