Creating a dll

L

leslie_tighe

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.
 
H

Herfried K. Wagner [MVP]

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?

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

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

leslie_tighe

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.
 
H

Herfried K. Wagner [MVP]

- Can I use the ComClass.vb files to start these project? Its seems to
generated the necessary entries for use with COM.

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.
- 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.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top