Exactly what functionality does an Interface provide?
Is there any Com specific functionality. For example, is IUnknown implemented by the compiler?
Or is it just a C++ vtable?
I'm reading up on COM, and I'd find this information useful.
btw: Anybody interested in learning more about Com might find this article interesting:
http://msdn.microsoft.com/library/defau ... 020298.asp
Quick question about interfaces.
IUnknow is (as all other interfaces) implemented by a definition, not by the compiler itself. Basically, an interface is a structure of pointers, where each pointer points on a function. It's the famous virtual table, as you can change functions on the fly only by changing a pointer. It's an indirect function call.
Fred, Just one more question.
Fred,
It seems that each Instance of an interface needs it's own VirtualTable.
Is there a specific reason why a single Virtual Table cannot be shared between all instances?
It seems that each Instance of an interface needs it's own VirtualTable.
Is there a specific reason why a single Virtual Table cannot be shared between all instances?