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

.NET ActiveX dll and regasm

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
>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

P: n/a
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

P: n/a

"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 discussion thread is closed

Replies have been disabled for this discussion.