COM mechanism - please help!

L

Laurentiu

Hi all,

I've just started to decipher the world of COM programming and I would
appreciate if someone can clarify this:

Why do I need to access a method in a class that implements an
interface through a pointer to that interface?

In other words, for instance, given the following:

Interface InterfaceA
{
virtual void DoSomething()=0;
};
class A : public InterfaceA
{
void DoSomething()
}

Why do I need to QueryInterface, to obtain a pointer to InterfaceA and
through InterfaceA access DoSomething().

I hope I understood correctly the mechanism.

Million thanks in advance.
 
J

Jonathan Turkanis

Laurentiu said:
Hi all,

I've just started to decipher the world of COM programming and I would
appreciate if someone can clarify this:

This is off topic here, since it is not about standard C++. I can't say where
you should redirect this question, but you might try one of the microsoft
groups.
Million thanks in advance.

It's a bad idea to pay in advance. I'll keep one and return 999, 999.

Jonathan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,287
Messages
2,571,430
Members
48,120
Latest member
ToTSlider

Latest Threads

Top