What are the differences between ActiveX, Ole, COM, ocx, and DLL?

Source: Internet
Author: User
Tags activex update

People familiar with object-oriented programming and network programming must be familiarActiveX,OleAndCOM/DCOMThese concepts are not unfamiliar, but many people are still vague about the relationship between them.

In the relationship between them, we should first clarify the components (Component) And object (Object. A component is a reusable module that consists of a set of processing processes, data encapsulation, and user interfaces (Rules object). The component looks like an object, but does not conform to the academic Definition of the object. Their main differences are:

1A component can be used in another application called a container (sometimes called a container or host ).ProgramAnd can also be used as an independent process;

2A component can be composed of one class, multiple classes, or a complete application;

3) Component for module reuse, and objectCodeReuse.

now, popular component models include com ( component objiect module , object component model) /DCOM ( Distributed COM , distributed object component model) and CORBA ( Common Object Request Broker Architecture , public Object Request proxy architecture ). Here, the topic related to this article has appeared com , however, CORBA is irrelevant to this document and will not be introduced. The difference between components and objects is to clarify com and CORBA are at the bottom of the entire architecture. If you cannot understand this, you may wish to continue looking at it. At last, you will naturally understand it when you look back.

Start nowActiveX,OleAndCom. First, let everyone have a general concept, from the perspective of time,OleIs the first to appear, and thenComAndActiveXFrom the perspective of architecture,OleAndActiveXIs created inComAbove, soComYes. From the perspective of name,Ole,ActiveXAre two trademark names, whileComIt is a pure technical term, which is also widely heard.ActiveXAndOle.

Since Ole Is the first to appear, then from OleSpeaking of, since Windows Since the operating system became popular, "clipboard "( Clipboard First, the communication between different programs is solved (the clipboard is used as the data exchange center for copying and pasting), but the clipboard transmits "dead" data, application developers have to write and parse the code in the data format themselves, so Dynamic Data Exchange ( Dynamic Data Exchange , DDE ) Communication protocols have emerged, allowing applications to automatically obtain the latest data from each other. However, solving the "Data Format" Conversion between each other is still a heavy burden on programmers. Object link and embedding ( Object Linking and embedded , Ole The birth of the original application data exchange to "Object Exchange", so that the program not only obtains data but also obtains the application objects of each other, and can directly use the data content of each other. In fact Ole Yes Microsoft Composite document technology, its initial version is only aimed at composite documents, but in later versions Ole2, Imported Com . As you can see, Com Yes Ole Is born, so although Com Yes Ole But Ole However Com Before.

Com The basic starting point is to let a software provide services for another software through a common institution. Com Yes Ole But its first user is Ole2 , So Com There is not much to do with composite documents. In fact, later Com As a technology that has nothing to do with composite documents, it has been widely used. In this way, Microsoft The general platform technology of "dyeing finger" was started. However Com It is not a product. It requires a trademark name. At that time Microsoft Market experts have already selected Ole Used as the trademark name. Com All technologies are being pasted. Ole . Although most of these technologies have nothing to do with composite documents. Microsoft This is a misunderstanding. Ole Is composite document only? Or is it not just a single compound document? Actually Ole Yes Com The trademark name is not just a compound document. However Microsoft I am afraid I cannot explain it clearly. It takes considerable effort and time.

therefore, with the development of Internet , in 1996 in spring, Microsoft changed its mind, select ActiveX as the new trademark name. ActiveX refers to the loose definition, based on com , while OLE still only refers to composite documents. Of course, ActiveX is still the core technology com . the biggest difference between ActiveX and OLE is that, OLE is designed for the integration of application software and files on the desktop, ActiveX focuses on providing further network applications and user interaction. At this point, you should consider ActiveX , OLE has a clear understanding of the relationship with com , com is the most fundamental core technology, so the following focuses on com .

Make the object model completely independentProgramming LanguageThis is a very novel idea. This is from C ++ And Java In terms of Object Concept, we can understand something. However Com What is an object? For ease of understanding Com It is regarded as a software packaging technology, that is, it is regarded as a different part of the software, according to a certain object-oriented form, combined into a process that can interact and support the database in groups. Com Objects can be used C ++ , Java And VB Can be written in any language. DLL It can also be implemented as an execution file for different processes. Use Com The object browser does not need to care about the language in which the object is written or DLLIt is still executed in another process. From the browser side, there is no difference. Such a general processing technique is very useful. For example, the two applications run in coordination by the user can take their common job part Com Interaction between objects (of course, the current Ole Composite document can also be done ). To execute Web The code downloaded from the server. The browser can regard it Com Object, that is, Com The technology is also a standard method for packaging downloadable code ( ActiveX Control ). Even connecting applications to the Local Machine OS The interaction method can also be used Com For example Windows And Windows NT New is used API, Mostly Com Object. Visible, Com Although originated from the composite document, it can be effectively applied to many software problems. After all, it is a basic technology at the underlying layer. In one sentence, Com It is a language-independent component architecture that allows components to communicate with each other. With the development of computer networks, Com Further developed into the Distributed Component Object Model, which is DCOM , It is similar CORBA Of Orb .

I believe everyone is rightActiveX,OleAndCOM/DCOMHave a clear understanding of the relationship.

Windows users must be familiar with ActiveX control. It provides a call similar to DLL dynamic link library,

The only difference with DLL is that ActiveX is not registered and cannot be recognized and used by the system. Then, when we get an ActiveX that is not correctly

What should I do if I want to install ActiveX after installing messages that are unavailable?
1.regsvr32 has a regsvr32.exe program under the systemfile folder of windows. It is the built-in ActiveX registration and anti-registration tool for Windows. You can also easily register ActiveX controls.

Its usage is: regsvr32 [/u] [/S] [/n] [/I [: using line] dllname, where dllname is the ActiveX control file name, we recommend that you copy the file to the system folder before installation.
Parameters have the following meanings:

/U-Unregistered Control
/S-whether the registration is successful or not, no prompt box is displayed
/C-console output
/I-Skip the control option for installation (different from registration)
/n-do not register the control, this option must be used with the/I option
for example, I want to register an amovie. OCX control, enter regsvr32 amovie. OCX, you only need to use regsvr32/u amovie to register it. OCX is enough.
compile the registry editing program, use keywords to search, and then export the Registry obtained after the search to a reg registry file, copy the corresponding activex file to the Windows system folder (generally, the activex file extension is OCX and is installed in the Windows system folder, finally, on the machine where ActiveX is to be installed, double-click to import the exported registry file to complete the installation.
ActiveX, Ole, and COM are some technical standards of Microsoft. Ole became ActiveX later, and then com later. OCX, DLL is the extension. ActiveX has two extensions: OCX and DLL. In fact, you can change their extensions.
as an ActiveX update technology, com may also have a dll extension. DLL files may also be dynamic link libraries. It mainly loads some functions and can be dynamically loaded.

automation technology is part of Microsoft OLE technology, which enables an interpreted macro language (mainly visual basic) control automation objects without understanding the Implementation Details of applications. With the development of Visual Basic software and the wide application of Microsoft Office suite, automation technology has become a link to connect these applications or tools. In addition, more applications use this macro language as their own extension means. For example, word, access, and notes all use the basic language as their development language, these basic languages support automation objects. On the other hand, the Internet browser also provides a script engine that can be used to interpret automation objects in Web Page scripting languages. All these applications can continue to develop, largely because these basic or scripting languages provide automation support.
automation technology is based on COM (Component Object Model). All automation objects implement standard idispatch interfaces, and expose object attributes and methods through the idispatch interface, this allows you to use these attributes in a customer program and call the methods it supports
. The customer program or Host Program of the Automation Object obtains the type information of the object runtime through the Type Library (T ypelibrary) and provides event processing. Based on the object type information, the macro language interpreter or script engine interprets the reference to object attributes and methods as a call to the invoke function of the idispatch interface member function to implement object control.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.