Getting started with COM

The Component Object Model was designed by Microsoft to be a language-agnostic architecture where programmers could re-use binary code objects easily. In more simple terms, someone, somewhere can write a COM component with various functions in any language they please, and you can obtain a compiled, binary copy of that component, and call those functions in your own language.

It is not as flexible as the .NET architecture, because you can only call functions and send and receive variables - with .NET, the language-agnosticism has bee taken even further to allow you to inherit new classes from classes created in a different language.

COM was introduced quite a few years ago, and is even available on Windows 95, so the chances are you have it installed. However, because it relies on calling shared objects, you may find that your system administrator has not granted you authorisation to use COM objects. You'll need to solve that, and any other installation and configuration issues, by yourself; there is not the space here to guide people in COM configuration!

 

Want to learn PHP 7?

Hacking with PHP has been fully updated for PHP 7, and is now available as a downloadable PDF. Get over 1200 pages of hands-on PHP learning today!

If this was helpful, please take a moment to tell others about Hacking with PHP by tweeting about it!

Next chapter: Instantiating an object >>

Previous chapter: Java and COM

Jump to:

 

Home: Table of Contents

Copyright ©2015 Paul Hudson. Follow me: @twostraws.