Library Zone Articles
External Articles
Byte Size

Discovery Zone Catalogue
Diary
Links
Bookstore
Interactive Zone Ask the Gurus
Discussion Groups
Newsletters
Feedback
Etc Cartoons
Humour
COMpetition
Advertising
Site Builder ASP Web Ring ASP Web Ring

Power your site with idr newswire
The Developer's Resource & Community Site
COM XML ASP Java & Misc. NEW: VS.NET
International This Week Forums Author Central Find a Job

Interface Programming

Introduction

Europe is changing, some people think it is good, others would prefer that it would not happen. If I buy a newspaper in the UK I will pay in Sterling, if I buy a paper in the Irish Republic then I will pay in Punts, but if I go to Euroland (which means mainly France or Germany) I will pay in Euros. The point is I know from the country what currency I should use. That is a kind of contract; if I try to use pounds in the Netherlands then I will not be able to buy anything.

What if I try to use Francs in France? Well, I will be able to use them, because while Euroland is being constructed there is essentially a dual currency system in operation, both currencies are supported. However, at some point the Euro will be the only currency, and at that time Francs and Deutchmarks will no longer be accepted.

How does this fit in with COM interfaces?

An interface is a contract. When a component says that it supports an interface it means that it agrees to every part of the interface - it is an all or nothing affair. That component may agree to support an older contract if it wishes to - just like France and Germany do now with their currencies - but the component, of course prefers the newer interface.

When does an interface become a 'new' interface? When you do anything to an existing interface (add a new method, change the parameters on a method, change a method name - anything) that interface is now a new interface and so should have a new IID.

Its just like going into any town in the UK and saying "the currency has changed, but only a little, we have kept the P, U, N of pound, got rid of the O and D and added a T". Now that means a new currency, the punt, which is a fine currency in itself, but it is not the currency that most people in that town would expect to use. You cannot change a currency and say that it is the same as before, and equally so you cannot change an interface and say it is the same interface.


Mail a question to the author!!

As part of the IDevResource commitment to Open Publishing, all of our authors are available to answer all of your trickiest questions at Author Central. For information about the authors, or to mail a question, visit them at Author Central.

Did you like this article?

If you liked this article, tell us about it. You can email your remarks to us at [email protected]

Want to read more articles by this author?

Try these:

Byte size articles:

ATL Server By Richard Grimes, 220200
Richard's report from European Devweek 2000, and VCDC Bonn 2000 gives an insight into the new ATL Server technology.
Go To Article.

COM and Apartments By Richard Grimes, January 7th 2000
A discussion on the creation and use of "Apartments" in Win32.
Go To Article.

An Introduction to WTL By Richard Grimes, January 7th 2000
Richard gives a basic introduction to WTL.
Go To Article.

An Introduction to Interface Programming By Richard Grimes, January 7th 2000
Richard describes the background to interfaces.
Go To Article.

Full size articles:

What is Async COM? By Richard Grimes.
Go To Article

Microsoft Transaction Server By Richard Grimes, December 9th 1999
Introduces Microsoft Transaction Server
Go To Article.

What COM is all about By Richard Grimes, December 6th 1999
An introductory article to COM, covering all basics including OLE, Activex and DLL's.
Go To Article.

Further Reading:

  1. Microsoft Transaction Server By Richard Grimes, introduces Microsoft Transaction Server
  2. What COM is all about By Richard Grimes, an introductory article to COM, covering all basics including OLE, Activex and DLL's.
  3. String Binding Moniker By Frank Rem, shows how a SB Moniker resolves a connection with a DCE RP server running on Linux using a VB client.
  4. Inside COM Monikers By Davide Marcato, on COMdeveloper.com. monikers are still one of the most clever but at the same time most misunderstood idioms in the COM universe. Davide explains them.

More ByteSize articles:

'ILoveYou' By Richard Grimes, 200500
Richard Grimes discusses the release of the Microsoft patch for the 'ILoveYou' virus. Go To Article.

COM+ 2.0 - First Announcement of Microsoft's New Technology By Richard Grimes, 100500
Richard Grimes reports on the recent news about COM+ 2. Go To Article.

How to use DDX with WTL? By Girish Bharadwaj, 270300
Go To Article.

ATL Server By Richard Grimes, 220200
Richard's report from European Devweek 2000, and VCDC Bonn 2000 gives an insight into the new ATL Server technology.
Go To Article.

COM Threading Models By Gopalan Suresh Raj, 070200
Gopalan explains the differences in COM and Win 32 threading models.
Go To Article.

ActiveX & COM By Gopalan Suresh Raj, 270100
Gopalan explains the basics of ActiveX / COM as a truly distributed Object Oriented Architecture.
Go To Article.

Type Library Info, XML and a bit of XSL for fun! by Richard Anderson 121199
This article assumes you understand COM, Type Libraries, XML and enough about VB that you can either use the code as a starting point, or, translate it into another language.
Go To Article.
This article can be downloaded: Zip File (76kb).

COM and Apartments By Richard Grimes, 070100
A discussion on the creation and use of "Apartments" in Win32.
Go To Article.

What is WTL? By Richard Grimes, 070100
Richard gives a basic introduction to WTL.
Go To Article.

An Introduction to Interface Programming By Richard Grimes, 070100
Richard describes the background to interfaces.
Go To Article.

Some links on COM:

  1. https://www.microsoft.com/com/ Microsoft's COM pages
  2. COMdeveloper.comVisit the COMdeveloper Web site for news items, articles, master classes, book reviews, a listserv, competitions, and a newsletter on COM, DCOM, ATL, and COM+ for VB, Java, and C++ developers.
  3. Chappell & Associates Visit the site hosted by Chappell & Associates to learn more about their seminars, videos, and articles on distributed computing, objects, and more.
  4. Codemarine, Inc. Visit the CodeMarine Web site to find information about in-depth COM training, mentoring, and consulting offerings.
  5. DevelopMentor Visit the CodeMarine Web site to find information about in-depth COM training, mentoring, and consulting offerings.


Author Bio:

Author: Richard Grimes

Richard Grimes started programming aeons ago on 8-bit computers and hasn't looked back since. He has spent an interesting time as a research scientist (the little known "Grimes Effect" is his creation), underpaid time as a computer trainer and done time as a distributed object developer.

ATL took hold of Richard while he was part of a team developing a COM-based workflow system and its elegance and simplicity has had a lasting effect on him. Although his is not an obsessively pure COM existence, he finds that an ATL-assisted COM lifestyle gives him more time to enjoy his garden.

Go to Richards pages in Author Central.


Power your site with idr newswire

Contribute to IDR:

To contribute an article to IDR, a click here.

To contact us at IDevResource.com, use our feedback form, or email us.

To comment on the site contact our webmaster.

Promoted by CyberSavvy UK - website promotion experts

All content © Copyright 2000 IDevResource.com, Disclaimer notice

WTL Introduction

Visit the IDR Forums

Visit the IDR Bookstore!

Java COM integration

Visit the IDR Forums