Контрольная работа: Распределенная обработка данных
trace("Client: Polychit' ykazatel na IY");
IY* pIY = NULL;
hr = pIUnknown->QueryInterface(IID_IY, (void**)&pIY);
if (SUCCEEDED(hr))
{
trace("Client: IY polychen");
pIY->Fy(); // Использовать интерфейс IY
}
trace("Client: Zaprosit' nepodderjivaemuy interface");
IZ* pIZ = NULL;
hr = pIUnknown->QueryInterface(IID_IZ, (void**)&pIZ);
if (SUCCEEDED(hr))
{
trace("Client: Interface IZ polychen");
pIZ->Fz();
}
else
{
trace("Client: No Interface IZ");
}
trace("Client: Polychit' Interface IY cherez Interface IX");
IY* pIYfromIX = NULL;
hr = pIX->QueryInterface(IID_IY, (void**)&pIYfromIX);
if (SUCCEEDED(hr))
{
trace("Client: IY polychen");
pIYfromIX->Fy();
}
trace("Client: Polechit' Interface IUnknown cherez IY");