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.
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.