Hello
I am working on a COM project in which i use Interface Inheritance.
The IDL file looks like this,
interface IEarthInterface : IUnknown
{};
interface IOceanInterface : IEarthInterface
{};
interface IPacificInterface : IOceanInterface
{};
interface IAntarticInterface : IOceanInterface
{};
interface IDataInterface : IUnknown
{};
interface IFindInterface : IDataInterface
{
HRESULT GetOceanTypeInterface(IOceanInterface** pOceanInterface);
};
From inside IFindInterface i need to figure out which Ocean is currently
attached and then attach or typecast
it was IOceanInterface and send it back to client.
All i wanted to know is how to get a Interface pointer from inside another
Interface.
ie, can i call CoCreateInstance or QueryInterface from inside IFindInterface
and get the
Interface Pointer to IPacificInterface or IAntarticInterface.
I been already told that CoCreateInstance will not work in this case.
Any idea how to implement this?
Thanks in advance.