do need Interfaces for COM

From: vimal (vim_8_at_rediffmail.com)
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
Vimal



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 ...
    (comp.object)
  • 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, ...
    (microsoft.public.vc.atl)
  • 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. ...
    (microsoft.public.dotnet.languages.csharp)
  • 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. ...
    (comp.lang.fortran)
  • 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 ...
    (microsoft.public.win32.programmer.ole)