What is an interface in C (COM) is it the same as a interface in C#
Posted
by numerical25
on Stack Overflow
See other posts from Stack Overflow
or by numerical25
Published on 2010-05-31T23:31:33Z
Indexed on
2010/05/31
23:43 UTC
Read the original article
Hit count: 210
Ok, I know what a interface is, but since I got into C and working with COM objects, it seems an interface in COM is a little different from the interface I know of.
So what I am trying to do is bridge the gaps here cause since I been learning C, alot of things have been sounding very familiar to me but are not exactly what they seem.
The interface I know of are like contracts. They are objects that have only method declarations, with no body. All classes that implement an interface must include the methods of the interface.
The interface I hear about in COM seems to be just pointers. They can not retrieve objects directly but only can retrieve objects through the means of a method. Is this what a COM Interface is ?? If so, then why did they give them the same names if they are completely different.
Also I just wanted to add that headers in C++ kind of remind me of the C# Interfaces. Not sure if their are any relations. But anyways, I am just trying to clear that up.
© Stack Overflow or respective owner