Re: Checking the existence of a method in an Interface
"Vi2" <sharachov@hotmail.com> wrote in message
news:d84d6004-c395-4220-81a4-17a8edd3b0f1@x41g2000hsb.googlegroups.com
Yes, this is illegal. I guess that's why these interfaces are marked
[hidden] - applications are not supposed to use them directly. COM
interface must only remain immutable once it's published: I guess MS
doesn't consider these published, but an internal implementation
detail.
[hidden] attribute and publishing interfaces are 2 differnet things:
"Published" is an informal, subjective concept. If the authors document
the interface and say you can use it now, they've effectively published
it and must commit to keeping it unchanged: if they don't, it's squarely
their fault. If they never documented it, but you figured it out by,
say, reverse-engineering some of their files, I guess they can argue
that the maintenance burden is on you: as far as they are concerned, you
were never supposed to use this interface, so they have no qualms
changing it.
It's just like using undocumented Windows APIs: functions are exported
from a DLL, but MS doesn't promise that they remain unchanged or even
still exist in the next Windows version. You can use them (and many
people do), but don't complain when your program stops working on a
future version.
Having said that, I do believe that what Microsoft is doing with these
interfaces is a Bad Idea. At the very least, they could change the IIDs
of these internal interfaces between versions, so that programs that
came to rely on them would break gracefully.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925