473,383 Members | 1,795 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,383 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 7855
>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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.