473,396 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Register DLL for COM interop

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
4 13662
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
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
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
> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: davidw | last post by:
I asked this before, someone said I need use regasm, but it doesn;t seem to work. I am developing a class library which impelements a smtp sink. when I compiled the project, the last statement...
6
by: Todd | last post by:
Hello, How do I register and non .net dll(with the OS) in a .net enviroment? I have a third party dll I need to register(REGSVR32.EXE). What is the best approach to this in a .Net enviroment. ...
1
by: Mullin Yu | last post by:
i write a c# application with reference to a VB6 com dll by using Add Reference -> COM i found an Interop.xxxx.dll has been created at the build directory. it works fine at my development...
3
by: Danny Mansour | last post by:
Hi there, I have created class library project called DSResolver in an attempt to create a SQL server Custom Conflict Resolver dll. My project contains on class called DataSafeResolve which...
2
by: Andy Bates | last post by:
Hi - I have a C# .NET assembly that exposes a COM interface (basically has an interface and class with Guid attributes). If I compile this under VS.NET (with the "Register for COM Interop"...
1
by: Luis Esteban Valencia | last post by:
I have a WebApplication (ASP.NET) that uses Word 2000 (COM , via Interop.Word.dll). I want to deploy it to a computer, but Word is not installed there. I tried to register the MSWORD.OLB (and...
4
by: Mihiri | last post by:
Hi, I have created a simple managed component in vb.Net with a public class exposing a public function. I successfully registered it using 'Regasm.exe' .. But when I tired to access it in vb...
1
by: Jo | last post by:
Hi all, I have a dll written in C#. I need this dll being called by some un-managed dll or app through COM. My question is, do I have to set 'Register for COM Interop' set to true in the...
8
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, I am using Visual Studio 2005 to develop a C# COM Class Library project. There is a setting in Build --Output, called *Register for COM Interop*. What is the usage of this...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.