?
Solved

How does an ActiveX component get auto-registered

Posted on 1999-07-26
5
Medium Priority
?
276 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

719 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