[gme-users] Decorator problems

Stefan Marte stefanmarte at yahoo.de
Thu Aug 19 15:29:41 CDT 2004


As before, when I do this, the code keeps crashing
GME. and afterwards I still have to figure out, which
of the children are actually ports. An example for
this callback would be extremely helpful. What am I
missing?

btw. thanks a lot for your help, it is very much
appreciated.

cheers
Stefan

 --- Peter Volgyesi <peter.volgyesi at vanderbilt.edu>
schrieb: 
> You don't have to (must not) create the collection
> "by hand". Get rid of the
> line containing the call to CoCreateInstance .
> --
> peter

STDMETHODIMP CDecorator::GetPorts(IMgaFCOs **portFCOs)
{
	VERIFY_INIT;
	CComPtr<IMgaFCOs> coll;
	if (m_mgaFco) {
		try {
			CComQIPtr<IMgaModel> model(m_mgaFco);
			model->get_ChildFCOs(&coll);
			coll->get_Count(&portcount);
		} catch (...) {
			// we are not an IMgaModel
		};
	};
	*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