473,414 Members | 1,697 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,414 software developers and data experts.

.NET ActiveX dll and regasm

Lou
I know I can make an ActiveX dll in .NET and it uses interop.
So I end up with 2 files, the .dll and the interop file.
I also know I need to use Regasm or something like that to register the .dll
as a COM object.
Am I right so far?

lets say I create a VB6 app and want to use the .NET dll.
Does the installer of the VB6 app have to register the .NET dll by calling
Regasm or can the
VB6 app call it directly the first time it runs.

I am somewhat confused on how all this works together.
any light in this would be appreciated.

-lou
Oct 2 '07 #1
3 7856
>I know I can make an ActiveX dll in .NET and it uses interop.

Uh, no you can't. You can *use* and ActiveX control in a .NET program via
InterOp, but not *create* an ActiveX control using .NET.
So I end up with 2 files, the .dll and the interop file.
I also know I need to use Regasm or something like that to register the
.dll as a COM object.
Am I right so far?

lets say I create a VB6 app and want to use the .NET dll.
Does the installer of the VB6 app have to register the .NET dll by calling
Regasm or can the
VB6 app call it directly the first time it runs.
If you create a .NET .dll and want to use it within a COM application,
you'll need to register the .NET assembly for use with COM InterOp (in the
..NET project's assembly settings). This will generate a COM .dll you can
then register via normal means and use from your COM app.

Oct 2 '07 #2
Lou
I figured out if I use Regasm and use the /reg switch which creates a .reg
file.
if I run the .reg file on the target machine, the .NET COM component works
fine.
I cannot register it as a normal COM component using regsvr32, it fails.
I think your info was wrong? It can't be registered in normal ways.
-Lou

"Scott M." <s-***@nospam.nospamwrote in message
news:ee**************@TK2MSFTNGP06.phx.gbl...
I know I can make an ActiveX dll in .NET and it uses interop.

Uh, no you can't. You can *use* and ActiveX control in a .NET program via
InterOp, but not *create* an ActiveX control using .NET.
>So I end up with 2 files, the .dll and the interop file.
I also know I need to use Regasm or something like that to register the
.dll as a COM object.
Am I right so far?

lets say I create a VB6 app and want to use the .NET dll.
Does the installer of the VB6 app have to register the .NET dll by
calling Regasm or can the
VB6 app call it directly the first time it runs.

If you create a .NET .dll and want to use it within a COM application,
you'll need to register the .NET assembly for use with COM InterOp (in the
.NET project's assembly settings). This will generate a COM .dll you can
then register via normal means and use from your COM app.

Oct 3 '07 #3

"Lou" <lo********@comcast.netwrote in message
news:Oe*************@TK2MSFTNGP05.phx.gbl...
>I figured out if I use Regasm and use the /reg switch which creates a .reg
file.
if I run the .reg file on the target machine, the .NET COM component works
fine.
There is no such thing as a .NET COM component. What happens is that you
have a .NET assembly, but by marking it for use with COM a wrapper is made
for your .NET assembly (a COM Callable Wrapper - CCW). It is this CCW that
your COM application interoperates with, not your .NET assembly.
I cannot register it as a normal COM component using regsvr32, it fails.
I think your info was wrong? It can't be registered in normal ways.
-Lou
>
"Scott M." <s-***@nospam.nospamwrote in message
news:ee**************@TK2MSFTNGP06.phx.gbl...
>I know I can make an ActiveX dll in .NET and it uses interop.

Uh, no you can't. You can *use* and ActiveX control in a .NET program
via InterOp, but not *create* an ActiveX control using .NET.
>>So I end up with 2 files, the .dll and the interop file.
I also know I need to use Regasm or something like that to register the
.dll as a COM object.
Am I right so far?

lets say I create a VB6 app and want to use the .NET dll.
Does the installer of the VB6 app have to register the .NET dll by
calling Regasm or can the
VB6 app call it directly the first time it runs.

If you create a .NET .dll and want to use it within a COM application,
you'll need to register the .NET assembly for use with COM InterOp (in
the .NET project's assembly settings). This will generate a COM .dll you
can then register via normal means and use from your COM app.


Oct 5 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: brazilnut52 | last post by:
I am going to outline the steps I go through to produce the problem. Hopefully this will help you understand the problem better I have created a simple COM DLL in .NET by using the COM class...
0
by: JC | last post by:
On my development PC, which is the machine that i 'build' my .net project, I have successfully exposed my .net dll to my vb6 application..intellisense and all. I have then used regasm to...
1
by: Craig | last post by:
I am having problems getting an ActiveX DLL written in VB6 to call a method in a C# class library component. My C# DLL is called CSharpProject.dll and contains a public class called CSharpClass....
6
by: Raed Sawalha | last post by:
I created ActiveX as following: namespace BmpActiveXNET { public interface DesktopScreen { string getDesktopScreen(); }
1
by: Raed Sawalha | last post by:
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...
3
by: ahmed khairy | last post by:
i've developed a user control using C# and turned it into a dll so that i can use it on the web on an html page. however i need to put that dll in a cab file so that it registers itself correctly...
4
by: Mr Seth T | last post by:
Hey, I have spent several days trying to find out how to do something, and i don't know if I am blind or what, but I can not find it. I am developing a web app and I need it to run an activex...
0
by: Mr Seth T | last post by:
Hey, I have spent several weeks now trying to find out how to get an activex control i have created to work outside of my testing environment. I am developing a web app and I need it to run...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.