[gme-users] Decorator problems
Stefan Marte
stefanmarte at yahoo.de
Thu Aug 19 14:27:51 CDT 2004
Hmm, i am still stuck with the decorator i am trying
to write. can anybody tell me what is wrong with this
piece of code?
cheers
Stefan
STDMETHODIMP CDecorator::GetPorts(IMgaFCOs **portFCOs)
{
//
// TODO: Return a collection of mga objects
represented as ports.
//
VERIFY_INIT;
CComPtr<IMgaFCOs> coll;
COMTHROW(coll.CoCreateInstance(OLESTR("Mga.MgaFCOs")));
if (m_mgaFco) {
// we first try to get a IMgaModel
try {
CComQIPtr<IMgaModel> model(m_mgaFco);
CComPtr<IMgaFCO> fco;
model->get_ChildFCOs(&coll);
coll->get_Count(&portcount);
long i = portcount;
for (long n = 1; n <= i; n++) {
coll->get_Item(n,&fco);
};
} catch (...) {
// we are not an IMgaModel
portcount = -1;
};
};
portcount = 0;
*portFCOs = coll.Detach();
return S_OK;
}
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
More information about the gme-users
mailing list