By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,156 Members | 1,004 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,156 IT Pros & Developers. It's quick & easy.

Register DLL for COM interop

P: n/a
I am trying to create a vb6 activeX dll in .Net. I used the upgrade wizard in
vs.net to load my vb6 project and it converted it to vb.net. Now I know that
I have to register the DLL from COM interop. I can check the box in vs.net on
the compiler tab to do this.

But how do I register my DLL for COM interop on another machine?
Apr 24 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi Philip,

I think you may try to use the Regasm tool, which will do the job just as
the IDE do.
Assembly Registration Tool (Regasm.exe)
http://msdn.microsoft.com/library/de...us/cptools/htm
l/cpgrfAssemblyRegistrationToolRegasmexe.asp

Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 24 '06 #2

P: n/a
Hi Philip,
I am trying to create a vb6 activeX dll in .Net.
Technically speaking, you can“t create VB6 ActiveX dlls in .NET. You can
create DLLs using VB.NET / C# that can behave as ActiveX components using
COM Interop.
I used the upgrade wizard in
vs.net to load my vb6 project and it converted it to vb.net. Now I know
that
I have to register the DLL from COM interop. I can check the box in vs.net
on
the compiler tab to do this.
But how do I register my DLL for COM interop on another machine?


You have several options:

- Manually you can use the command-line regasm.exe utility, likely with the
/codebase switch. Check the docs about this.

- Programatically you can use the
System.RunTime.InteropServices.RegistrationService s class, using the
RegisterAssembly function, for example.

- If your setup technology is aware of registration of .NET assemblies for
COM Interop, you should instruct the setup to do this.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com

Apr 24 '06 #3

P: n/a
Can I instruct the Setup project template in vs.net 2005 to register it?

"Carlos J. Quintero [VB MVP]" wrote:
Hi Philip,
I am trying to create a vb6 activeX dll in .Net.


Technically speaking, you canĀ“t create VB6 ActiveX dlls in .NET. You can
create DLLs using VB.NET / C# that can behave as ActiveX components using
COM Interop.
I used the upgrade wizard in
vs.net to load my vb6 project and it converted it to vb.net. Now I know
that
I have to register the DLL from COM interop. I can check the box in vs.net
on
the compiler tab to do this.
But how do I register my DLL for COM interop on another machine?


You have several options:

- Manually you can use the command-line regasm.exe utility, likely with the
/codebase switch. Check the docs about this.

- Programatically you can use the
System.RunTime.InteropServices.RegistrationService s class, using the
RegisterAssembly function, for example.

- If your setup technology is aware of registration of .NET assemblies for
COM Interop, you should instruct the setup to do this.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com


Apr 24 '06 #4

P: n/a
> Can I instruct the Setup project template in vs.net 2005 to register it?

Yes. In your setup project, just set "Register" property for your DLL
file to something containing COM. See
http://msdn2.microsoft.com/en-US/library/z5s1e2wh.aspx for more details.
--
Peter Macej
Helixoft - http://www.vbdocman.com
VBdocman - Automatic generator of technical documentation for VB, VB
..NET and ASP .NET code
Apr 24 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.