473,721 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Merging ActiveX Control

Hi Every body,
I am currently working in aproject where I am stuck in merging an
ActiveX control (*.ocx) file into a managed Class Library (*.dll). I want to
hide the ActiveX Control in this managed Dll, so that even when things are
deployed I don't wanna see two files, but only 1 file which is the dll, and
it would contain within it, the other ocx file.

Is this possible? If yes, then how can I do something like this, I tried to
use ILMerge, but it sounds that it doesn't do what I wanted to have..

Thanks
Khaled Hussein
Apr 1 '06 #1
7 2195


"Khaled Hussein" <kh************ @gmail.com> wrote in message
news:OF******** ******@TK2MSFTN GP10.phx.gbl...
| Hi Every body,
| I am currently working in aproject where I am stuck in merging an
| ActiveX control (*.ocx) file into a managed Class Library (*.dll). I want
to
| hide the ActiveX Control in this managed Dll, so that even when things are
| deployed I don't wanna see two files, but only 1 file which is the dll,
and
| it would contain within it, the other ocx file.
|
| Is this possible? If yes, then how can I do something like this, I tried
to
| use ILMerge, but it sounds that it doesn't do what I wanted to have..
|
| Thanks
| Khaled Hussein
|
|

No, activeX control libraries (DLL's or OCX) locations are registered in the
COM DB (the component regisry) such that they can be loaded by the COM
infrastructure, COM is not designed to load them from anything else.
I don't see why you need this,really.

Willy.
Apr 1 '06 #2
Willy,
First, Thanks for your concern..
Second, OK, if I can't hide it inside my dll, then I would have another
question .. is there any way to Register this COM programatically from my
application? (I don't mean deployment stuff) .. but I would need a function
for example to register this COM object, and then these other functions
start using it..

Is it possible to do it?
Thanks
Khaled Hussein

"Willy Denoyette [MVP]" <wi************ *@telenet.be> wrote in message
news:uH******** ******@TK2MSFTN GP09.phx.gbl...


"Khaled Hussein" <kh************ @gmail.com> wrote in message
news:OF******** ******@TK2MSFTN GP10.phx.gbl...
| Hi Every body,
| I am currently working in aproject where I am stuck in merging an
| ActiveX control (*.ocx) file into a managed Class Library (*.dll). I
want
to
| hide the ActiveX Control in this managed Dll, so that even when things
are
| deployed I don't wanna see two files, but only 1 file which is the dll,
and
| it would contain within it, the other ocx file.
|
| Is this possible? If yes, then how can I do something like this, I tried
to
| use ILMerge, but it sounds that it doesn't do what I wanted to have..
|
| Thanks
| Khaled Hussein
|
|

No, activeX control libraries (DLL's or OCX) locations are registered in
the
COM DB (the component regisry) such that they can be loaded by the COM
infrastructure, COM is not designed to load them from anything else.
I don't see why you need this,really.

Willy.

Apr 1 '06 #3
hi
i need ur help khalid since u used ilmerge .

i have a problem i have one windows service which i am installing from
one other exe(in process.start simply using cmd.exe and installutil)
now i want to combine these both exes into one for deployment.
see tell me how i will use path for the windows service when i will
embedd it into the one whole exe(in cmd.exe installutil)
can i give path of the exe which i am itself merging into it .
i meam how ilmerge will merge both
shan

Apr 1 '06 #4
I don't know much about ILMerge, I was just looking for specific
functionality indeed. But I don't think this applies to webservices.

"shan" <sh*******@gmai l.com> wrote in message
news:11******** **************@ u72g2000cwu.goo glegroups.com.. .
hi
i need ur help khalid since u used ilmerge .

i have a problem i have one windows service which i am installing from
one other exe(in process.start simply using cmd.exe and installutil)
now i want to combine these both exes into one for deployment.
see tell me how i will use path for the windows service when i will
embedd it into the one whole exe(in cmd.exe installutil)
can i give path of the exe which i am itself merging into it .
i meam how ilmerge will merge both
shan

Apr 1 '06 #5
Not sure what kind of component you are talking about, but an OCX is an
ActiveX control type, that means it's instantiated with it's control
container (a Windows Form?), that means that it must be registered before
you can (successfully) create an instance of the control container. That
would mean that you need to check the registry (query the CLSID or ProgID)
for the component and register it when not found, registering can be done by
calling Process.Start and shell-out Regsvr32.exe, just make sure that you
need to specify the full path of the ocx file.
I must say that I hate this whole idea though, you should never install
application components without providing an installer/uninstaller.

Willy.

"Khaled Hussein" <kh************ @gmail.com> wrote in message
news:uv******** ******@TK2MSFTN GP14.phx.gbl...
| Willy,
| First, Thanks for your concern..
| Second, OK, if I can't hide it inside my dll, then I would have another
| question .. is there any way to Register this COM programatically from my
| application? (I don't mean deployment stuff) .. but I would need a
function
| for example to register this COM object, and then these other functions
| start using it..
|
| Is it possible to do it?
| Thanks
| Khaled Hussein
|
| "Willy Denoyette [MVP]" <wi************ *@telenet.be> wrote in message
| news:uH******** ******@TK2MSFTN GP09.phx.gbl...
| >
| >
| > "Khaled Hussein" <kh************ @gmail.com> wrote in message
| > news:OF******** ******@TK2MSFTN GP10.phx.gbl...
| > | Hi Every body,
| > | I am currently working in aproject where I am stuck in merging an
| > | ActiveX control (*.ocx) file into a managed Class Library (*.dll). I
| > want
| > to
| > | hide the ActiveX Control in this managed Dll, so that even when things
| > are
| > | deployed I don't wanna see two files, but only 1 file which is the
dll,
| > and
| > | it would contain within it, the other ocx file.
| > |
| > | Is this possible? If yes, then how can I do something like this, I
tried
| > to
| > | use ILMerge, but it sounds that it doesn't do what I wanted to have..
| > |
| > | Thanks
| > | Khaled Hussein
| > |
| > |
| >
| > No, activeX control libraries (DLL's or OCX) locations are registered in
| > the
| > COM DB (the component regisry) such that they can be loaded by the COM
| > infrastructure, COM is not designed to load them from anything else.
| > I don't see why you need this,really.
| >
| > Willy.
| >
| >
|
|
Apr 1 '06 #6
The only option that I can think of which might be a better solution is
to use registration-free COM, which would prevent the need for registering
the component. The following article shows how to do it:

http://msdn.microsoft.com/msdnmag/is...M/default.aspx

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Willy Denoyette [MVP]" <wi************ *@telenet.be> wrote in message
news:uo******** ******@TK2MSFTN GP14.phx.gbl...
Not sure what kind of component you are talking about, but an OCX is an
ActiveX control type, that means it's instantiated with it's control
container (a Windows Form?), that means that it must be registered before
you can (successfully) create an instance of the control container. That
would mean that you need to check the registry (query the CLSID or ProgID)
for the component and register it when not found, registering can be done
by
calling Process.Start and shell-out Regsvr32.exe, just make sure that you
need to specify the full path of the ocx file.
I must say that I hate this whole idea though, you should never install
application components without providing an installer/uninstaller.

Willy.

"Khaled Hussein" <kh************ @gmail.com> wrote in message
news:uv******** ******@TK2MSFTN GP14.phx.gbl...
| Willy,
| First, Thanks for your concern..
| Second, OK, if I can't hide it inside my dll, then I would have another
| question .. is there any way to Register this COM programatically from
my
| application? (I don't mean deployment stuff) .. but I would need a
function
| for example to register this COM object, and then these other functions
| start using it..
|
| Is it possible to do it?
| Thanks
| Khaled Hussein
|
| "Willy Denoyette [MVP]" <wi************ *@telenet.be> wrote in message
| news:uH******** ******@TK2MSFTN GP09.phx.gbl...
| >
| >
| > "Khaled Hussein" <kh************ @gmail.com> wrote in message
| > news:OF******** ******@TK2MSFTN GP10.phx.gbl...
| > | Hi Every body,
| > | I am currently working in aproject where I am stuck in merging an
| > | ActiveX control (*.ocx) file into a managed Class Library (*.dll). I
| > want
| > to
| > | hide the ActiveX Control in this managed Dll, so that even when
things
| > are
| > | deployed I don't wanna see two files, but only 1 file which is the
dll,
| > and
| > | it would contain within it, the other ocx file.
| > |
| > | Is this possible? If yes, then how can I do something like this, I
tried
| > to
| > | use ILMerge, but it sounds that it doesn't do what I wanted to
have..
| > |
| > | Thanks
| > | Khaled Hussein
| > |
| > |
| >
| > No, activeX control libraries (DLL's or OCX) locations are registered
in
| > the
| > COM DB (the component regisry) such that they can be loaded by the COM
| > infrastructure, COM is not designed to load them from anything else.
| > I don't see why you need this,really.
| >
| > Willy.
| >
| >
|
|

Apr 1 '06 #7
Could be an option, but there are a lot of restrictions, it's only available
on XP and higher, and it depends on the type of application, for instance if
the control is to be hosted in the Webbrowser control it won't work.

Willy.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in
message news:uY******** ********@TK2MSF TNGP14.phx.gbl. ..
| The only option that I can think of which might be a better solution is
| to use registration-free COM, which would prevent the need for registering
| the component. The following article shows how to do it:
|
| http://msdn.microsoft.com/msdnmag/is...M/default.aspx
|
| Hope this helps.
|
| --
| - Nicholas Paldino [.NET/C# MVP]
| - mv*@spam.guard. caspershouse.co m
|
| "Willy Denoyette [MVP]" <wi************ *@telenet.be> wrote in message
| news:uo******** ******@TK2MSFTN GP14.phx.gbl...
| > Not sure what kind of component you are talking about, but an OCX is an
| > ActiveX control type, that means it's instantiated with it's control
| > container (a Windows Form?), that means that it must be registered
before
| > you can (successfully) create an instance of the control container. That
| > would mean that you need to check the registry (query the CLSID or
ProgID)
| > for the component and register it when not found, registering can be
done
| > by
| > calling Process.Start and shell-out Regsvr32.exe, just make sure that
you
| > need to specify the full path of the ocx file.
| > I must say that I hate this whole idea though, you should never install
| > application components without providing an installer/uninstaller.
| >
| > Willy.
| >
| >
| >
| > "Khaled Hussein" <kh************ @gmail.com> wrote in message
| > news:uv******** ******@TK2MSFTN GP14.phx.gbl...
| > | Willy,
| > | First, Thanks for your concern..
| > | Second, OK, if I can't hide it inside my dll, then I would have
another
| > | question .. is there any way to Register this COM programatically from
| > my
| > | application? (I don't mean deployment stuff) .. but I would need a
| > function
| > | for example to register this COM object, and then these other
functions
| > | start using it..
| > |
| > | Is it possible to do it?
| > | Thanks
| > | Khaled Hussein
| > |
| > | "Willy Denoyette [MVP]" <wi************ *@telenet.be> wrote in message
| > | news:uH******** ******@TK2MSFTN GP09.phx.gbl...
| > | >
| > | >
| > | > "Khaled Hussein" <kh************ @gmail.com> wrote in message
| > | > news:OF******** ******@TK2MSFTN GP10.phx.gbl...
| > | > | Hi Every body,
| > | > | I am currently working in aproject where I am stuck in merging
an
| > | > | ActiveX control (*.ocx) file into a managed Class Library (*.dll).
I
| > | > want
| > | > to
| > | > | hide the ActiveX Control in this managed Dll, so that even when
| > things
| > | > are
| > | > | deployed I don't wanna see two files, but only 1 file which is the
| > dll,
| > | > and
| > | > | it would contain within it, the other ocx file.
| > | > |
| > | > | Is this possible? If yes, then how can I do something like this, I
| > tried
| > | > to
| > | > | use ILMerge, but it sounds that it doesn't do what I wanted to
| > have..
| > | > |
| > | > | Thanks
| > | > | Khaled Hussein
| > | > |
| > | > |
| > | >
| > | > No, activeX control libraries (DLL's or OCX) locations are
registered
| > in
| > | > the
| > | > COM DB (the component regisry) such that they can be loaded by the
COM
| > | > infrastructure, COM is not designed to load them from anything else.
| > | > I don't see why you need this,really.
| > | >
| > | > Willy.
| > | >
| > | >
| > |
| > |
| >
| >
|
|
Apr 1 '06 #8

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

Similar topics

1
5992
by: wang xiaoyu | last post by:
Hello: i want use activex in wxpython program,but when i use MakeActiveXClass an exception occurs. this is my source code dealing the DICOM ocx.I must note that in this program "hwtxcontrol" is a ocx developed my me use vc6,this ocx works fine in wxpython. but you can see i only change this ocx with a new DICOM ocx and set up eventClass,
2
7570
by: Fie Fie Niles | last post by:
This one XP machine (with IE 6) is having a problem viewing any ActiveX controls (created on VB6) on the Internet Explorer browser. I put the same ActiveX control in a VB program, and when I run the VB program on that same machine, I can view the ActiveX control fine. He is using Citrix. The same ActiveX controls can be viewed on other machines. When trying to view 1 of the ActiveX control, he got an error "Visual Basic Run-time redist...
0
1154
by: Naresh Narwani | last post by:
Problem Summary: Merging two different web applications into one create a problem for User Controls. Reason for merging two different Web Application: To share non serializable object information between the Web applications. Problem Statement: Suppose I have two different web applications WebApp1 and WebApp2, both of them have the
3
2517
by: Jeffery Franzen | last post by:
Anyone know where the documentation is regarding Activex controls in asp web forms? I'm using VS.NET 2002 enterprise and am trying to use Activex controls in vb.net web form app. I do the add control to pallete and then add a reference. I get the interop dll added to bin folder. I did this with the MediaPlayer activex control as a simple case to to try and get it working. I set the control to autostart via the html parameter tag for...
3
2302
by: Weston Fryatt | last post by:
Simple question I hope.... How do I send data to and from an ASP.Net (server side) web page to a ActiveX Control (client side) embedded in a web browser??? What I need to do, is I have image data (mostly TIFF format) that need to be sent to our custom Image Viewer (ActiveX control). So far I can get the TIFF image data loaded into a Byte Array in C# on my ASP.Net web page, But how do I send this data now to my ActiveX control on the...
7
4395
by: Jarod_24 | last post by:
I just downloaded a activex control that was written in C# and tried to view it on my PDA's Internet Explorer. At my regular PC it displayed just fine, but nothing showed up on the pda. Do ActiveX controls that are to be used by a pda need to be written in the ..net compact framework, or am i missing something else here? i have a HP iPaq 2490 with Windows Mobile Premium installed While i'm at it; does a activex control allow you to...
1
2232
by: Jayender | last post by:
Hi, I have an ActiveX control (to display the Images),I have added the reference of that in my web based applicaton .and added the ocx in my tool bar , but the viewer (activex component- ocx ) is disabled , but i tried this in Window based application, and it works great , but i need to do it in Web based applicaion , is there anything i need to add for making that to enable so that i can drag and place it in my web form ? waiting for...
6
3517
by: Budhi Saputra Prasetya | last post by:
Hi All, I'm trying to display .NET Custom Control (created using Inherited Control) on an ASPX page, but no luck. I already registered the Control to Global Assembly Cache through .NET Framework 1.1 Configuration. I have also put a reference to the control on my ASP .NET project. The view that I get is only a disabled text area. Below is the code that I'm using:
6
8076
by: hufaunder | last post by:
I have an ActiveX component that I want to use in a library that I am writing. As a first test I used the ActiveX component in a windows form application. Adding the component created: Ax.dll .dll I can not call the functions in the ActiveX component. In the next step I tried to use the ActiveX component in a class library. I simply added a reference to the corresponding COM component. This this only
0
8840
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8730
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9367
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9215
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9131
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8007
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5981
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4484
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4753
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.