do need Interfaces for COM

From: vimal (
Date: 05/12/04

Date: 12 May 2004 03:49:38 -0700

Hi ,

I am currently learning COM using c++. Just when I completed the
chapter about Interfaces in Dale Rogerson's Inside COM, i got a basic
question in my mind.
Why do we need Interfaces?? Cant we achieve what Interfaces do by just
exported functions?

As far as i know Interfaces are nothing but placeholders for function
pointers. If this is true why not the QueryInterface function return
the Function pointers instead of Interface pointers??

I appreciate any light on this thought .

Thanks in advance

Relevant Pages

  • Re: The Failure of OOP
    ... >> Hi Calum, ... > could definitely rig something that will show interfaces in your favour. ... In some scenarios you would have more pointers than objects, ... Christopher Diggins ...
  • Re: Passing Smart Pointers as Parameters
    ... How do you obtain interface pointers on your own object? ... It's not the problem with the interfaces on my object. ... debug output... ... should see the debug output, ...
  • Re: What I dont like about C# so far, compared to C++ (managed or otherwise)
    ... 1/ no pointers or tracking pointers or handles--this is absurd. ... order to support them. ... In what way aren't interfaces supported? ... inheritance of interface and single inheritance of implementation. ...
  • Re: Testing for available libraries
    ... BINDinterfaces to make this portable. ... I'll take a look at the libtool documentation. ... pointers: libdl returns C function pointers, ... but you are subject to portability issues. ...
  • Re: Does IUnknown pointer comparison work across process boundarie
    ... Many thanks Igor, thats the gist of what I am asking. ... These interface pointers would arrive in theObjectComparer.exe process via ... the interfaces passed to SetObject1() and SetObject2 ...