Registering ActiveX Component using code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello I have ActiveX DLL and I usually register it using following procedure

1. gactutil -i ActiveXDLL
2. regasm ActiveXDLL /tlb:DLLNAME/codebase
3. then using the activeX

can I automate step 1 and 2 inside ActiveX itself
 
Hi,

First of all, gacutil.exe and regasm.exe don´t work with ActiveX DLLs, but
with .NET assemblies. Some .NET assemblies can be registered as ActiveX
(COM) components using regasm.exe. Said that, you can use the
System.Runtime.InteropServices.ComRegisterFunction and ComUnregisterFunction
attributes (see the docs) to perform custom actions when your assembly is
registered for COM interop using a .NET-aware tool (such as regasm.exe or
some tool built with System.Runtime.InteropServices.RegistrationServices
functions). So, in theory you can install the assembly in the GAC while is
being COM-registered, but I have not tested it.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
 

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

Back
Top