November 28, 2020
Hot Topics:

VB6 Programmer's Introduction to COM

  • By James Limm
  • Send Email »
  • More Articles »

Microsoft decided to make a second stab at component interaction in the early part of 1993, at which time OLE 2.0 came into existence. COM was a core component of OLE 2.0, and so the latter can be used as a way of explaining the features we know COM to have today. By providing COM as a means for components to communicate with one another, OLE 2.0 went well beyond the linking and embedding used to create compound documents. In response, Microsoft's marketing department came to the decision to drop the name "Object Linking and Embedding" and simple call it "OLE" (most people pronounce it "oh-lay"). OLE was the rubber stamp applied to anything that dealt with COM technologies.

One of the products of this expansion was OLE Automation. Put simply, OLE Automation (which today is just called Automation) allows a client to call the services exposed by a suitably endowed server, which is usually a major application. For example, it's possible using this technology to create an instance of Microsoft Excel, put numbers into a new workbook, crunch the numbers and then close the application again all from a Visual Basic program, without a single line of Microsoft Excel VBA code! Indeed, many software companies make their living from programming Automation clients that work with the Microsoft Office suite of applications.

If you've come across VBXs in your Visual Basic career, you're probably thinking that they must fit in to the story at around this point - aren't they reusable software components that you can use in Visual Basic? Well, you're on the right road, but you're headed in the wrong direction! VBXs were pre-packaged components written to tie into Visual Basic specifically, providing services such as list boxes or communication controls. These VBXs were great at the time because they provided support for the development methodology called Rapid Application Development (RAD). Just like the example in the last section, if you needed to have communication functionality in your program, it was as simple as dragging a control from the toolbox onto a Visual Basic form.

Although VBXs had the achievement of spawning a third-party industry that provided pre-packaged developer tools for the Visual Basic programmer, they also had three significant problems. First, they were not COM-based and were therefore a proprietary technology for Visual Basic - there was no way to use them from other programming languages. Second, you couldn't actually build a VBX using Visual Basic - instead you had to use something like C++, and even then they were difficult to write. Third, VBXs were limited to a 16-bit architecture.

According to Microsoft's web site, "COM supports the only currently viable component marketplace. The market for third-party components based on COM has been estimated at US$670 million in 1998, with a projected 65 percent compound annual growth rate, growing to approximately US$3 billion by 2001. (Source: Giga Information Group)"

It's great to know there are thousands of companies out there right now building components to make our lives easier!

Page 6 of 12

This article was originally published on November 20, 2002

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date