What is the meaning of the number in the end of the interface name? I see that IHTMLDocument3-7
have no members (see example for #5), and 8
has gesture related members. Is the number derived from Windows version?
This is a general feature of public COM interfaces.
If you want backward compatibility, you never want to change a published interface, because that would mean all the code people wrote for, say, IE 6 stops working with IE 7, and all of their customers get mad at them, and they get mad at you.
So, if IE 5 adds new features that needed to be exposed, instead of changing IHTMLDocument
, you create a new interface, and make IE5 support both (by inheritance, QueryInterface
, or some more explicit mechanism). And when IE 7.0.2 or IE 8 or Win XP or whatever adds even more new features, you create another one. And so on.
While MS could have come up with descriptive suffixes instead of just sequential numbers, that would probably be more confusing than helpful. So, IHTMLDocument2
, IHTMLDocument3
, etc. are the names. They don't mean anything, except the order they were added.