472,783 Members | 983 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,783 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 7811
>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: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{

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.