[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

How does an ActiveX component get auto-registered

Posted on 1999-07-26
5
Medium Priority
?
279 Views
Last Modified: 2012-06-27
Does an ActiveX component get auto-registered (when first launched by a browser) by the regsvr32 utility, and if so, where does this utility come from?  Should it be part of IE4 or the OS?

I have a comercial app that I can modify to use ActiveX controls.  These controls will be auto-registered when the form is first loaded by a program called regsvr32.  Many of my client PCs do not have this utility.  So I wonder if this is the same utility that auto-registers ActiveX components seen by a browser and where does regsvr32 come from if many clients don't have it.
0
Comment
Question by:GregoryGr
  • 2
  • 2
5 Comments
 
LVL 3

Expert Comment

by:knowme
ID: 1826754
ActiveX is an open integration platform that provides developers, users, and Web producers a fast and easy way to create integrated applications and content for the Internet and Intranets. Using ActiveX, you can easily insert multimedia effects, interactive objects, and sophisticated applications into a Web page, creating a user experience comparable to that of high quality multimedia CD-ROM titles.


ActiveX is a standard that enables software components to interact with one another in a networked environment, regardless of the language(s) used to create them. Most World Wide Web (WWW) users will experience ActiveX technology in the form of ActiveX controls, ActiveX documents, and ActiveX scripts.



ActiveX Controls
ActiveX controls, formerly known as OLE controls or OCX controls, are components (or objects) that you can insert into a Web page or other application so that you can reuse packaged functionality that someone else programmed. For example, the ActiveX controls that are included with Microsoft Internet Explorer allow you to enhance your Web pages with sophisticated formatting features and animation.



A key advantage of ActiveX controls over Java applets and Netscape plug-ins is that ActiveX controls can also be used in applications written in many programming languages, including all of the Microsoft programming and database languages.



ActiveX Documents
When browsing with an ActiveX-aware Web browser, such as Microsoft Internet Explorer, ActiveX documents enable you to open an application with its own toolbars and menus available. This means you can open non-HTML files, such as Microsoft Excel or Microsoft Word files, using an ActiveX-aware Web browser.



ActiveX Scripting
ActiveX scripting supports most popular scripting languages, including Visual Basic Script and JavaScript. ActiveX scripting can be used to integrate the behavior of several ActiveX controls and/or Java applica- tions from the Web browser or server, extending their functionality.



0
 

Author Comment

by:GregoryGr
ID: 1826755
I need to know how an ActiveX component gets "registered" on a machine once the component is activated from within a Web browser.

I wrote an ActiveX component that I embedded within a purchased app.  That app uses "regsvr32" to auto-register the component.  What would IE4 use?
0
 
LVL 4

Expert Comment

by:mandhjo
ID: 1826756
I believe regsvr32 comes with the resource kit, but it could come with lots of things.  For example, I searched for regsvr32.exe on my harddrive and came back with versions in

\program files\devstudio\sharedidebin (shared by all devstudio components)
\program files\devstudio\vss\win32 (Visual Source Safe)
\winnt\system32 (any app could have put it here)
\winnt\system32\inetsrv (Microsoft IIS)
etc
etc

This utility doesn't do anything special.  It basically calls a specific entry point within COM objects (as you know, ActiveX controls are COM Objects).  You say you wrote an ActiveX component.  Look in the main implementation file of your ActiveX control.  You will see a function called DllRegisterServer that takes no parameters.

Basically, regsvr32 loads a COM DLL (or OCX) into memory and calls the DLLRegisterServer function to register the DLL (or OCX) or DLLUnregisterServer to unregister it.  It also shows a message box to show success or failure.

All that to say, you could write your own registration utility that calls DLLRegisterServer to register the control or DllUnregisterServer to unregister it.

As for IE 4.0, for an ActiveX control to be downloaded, a CAB file is usually created with the CAB file containing a compressed version of the OCX and an INF file that coordinates the download and registration of the OCX.  IE 4.0 could be using the Regsvr32 utility, or it could be simply loading the OCX into memory and calling the DLLRegisterServer entry point (that is, doing the job of regsvr32).
0
 

Author Comment

by:GregoryGr
ID: 1826757
Mandhjo-
Thanks, you have answered my question.

If you change/add your comment as a solution, I'll accept it and close out the question.

Thanks again!
0
 
LVL 4

Accepted Solution

by:
mandhjo earned 400 total points
ID: 1826758
Glad I could help.  See my comments below.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Internet is a big network which is formed by connecting multiple small networks.It is a platform for all the users which are connected to it.Internet act as platform in different fields. Such as: Internet  as a collaboration platform. Internet  as…
Each password manager has its own problems in dealing with certain websites and their login methods. In Part 1, I review the Top 5 Password Managers that I've found to be the best. In Part 2 we'll look at which ones co-exist together and why it'…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…
Suggested Courses

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question