Newbie - Create ActiveX DLL


G

gburson

Hello,

Although being a competent Java programmer, I'm struggling to achieve
a simple task using Visual Basic.

I want to create a simple "ActiveX COM DLL".

So I downloaded Visual Basic 2005 Express Edition.

Firstly, I had a sample VB project from Visual Basic 6 which I tried
to open, which took me through an upgrade path and the resulting
project had so many errors I had to abandon it.

So back to basics, I looked at the documentation (for the tool I'm
trying to create the activex dll for) and googled the creation of an
activex dll.

Both sources of information say I should create a new project of type
"Project-ActiveX DLL". Unfortunately that project type doesn't exist.

So I tried just creating a "Class Library" project that contains a
single class that looks like this: -

Public Class TestEAAddIn
Function EA_GetMenuItems(ByVal Repository As EA.Repository, ByVal
MenuLocation As String, ByVal MenuName As String) As Object
Return "Glens Menu"
End Function
End Class

EA, by the way, is the application I'm trying to build the ActiveX DLL
for. This compiles just fine, but when I try to register it I get: -

regsvr32 "C:\Users\glen\Documents\Visual Studio 2005\Projects\SalmonEA
\SalmonEA\bin\Release\TestEA.dll"

"The module "C:\Users\glen\Documents\Visual Studio 2005\Projects
\SalmonEA\SalmonEA\bin\Release\TestEA.dll" was loaded but the entry
point DllRegisterServer was not found."

So I've googled and googled, both on the error message and looking for
a simple example of an Active Com DLL for me to start with but to no
avail!

Any help most gratefully appreciated.

Regards,
Glen.
 
Ad

Advertisements

H

Herfried K. Wagner [MVP]

Although being a competent Java programmer, I'm struggling to achieve
a simple task using Visual Basic.

I want to create a simple "ActiveX COM DLL".

So I downloaded Visual Basic 2005 Express Edition.

VB.NET (VB.NET 2002, 2003, and VB 2005) are .NET-based programming languages
which depend on the .NET Framework. On the other hand, VB6 is a
COM/ActiveX-based programming environment which is very suitable for
creating ActiveX DLLs and controls.

Nevertheless, you can expose interfaces, classes, and methods implemented in
a .NET DLL to COM:

Exposing .NET Framework Components to COM
Both sources of information say I should create a new project of type
"Project-ActiveX DLL". Unfortunately that project type doesn't exist.

This project type does not exist in VB.NET, it only exists in VB up to
version 6.0.
 

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