[gme-users] unknown error code after IMgaMetaAspect::get_Name

Stefan Marte stefanmarte at yahoo.de
Mon Aug 23 17:12:43 CDT 2004


Hi everybody!

Is there any reason why the following code should
fail? I am trying to find the right part of an FCO for
a given aspect. I have an IMgaMetaAspect and a
IMgaFCO.
 
Everything seems to work fine until I try to access
the name of the metaspect (ma), where I get an error
value of 0x80731005. 

anybody who can help me?

cheers
Stefan

CComPtr<IMgaPart> CFcoHelper::PART(CString name) {
	CComPtr<IMgaParts> parts; // IMgaFCO
	long pc;

	BSTR anam;
	BOOL rval;
	CString bnam;

	fco->get_Name(&anam);
	bnam = anam;
	fco->get_Parts(&parts);
	parts->get_Count(&pc);

	for (int i = 0; i< pc;i++) {
		try {
			CComPtr<IMgaPart> part;
			CComPtr<IMgaMetaPart> mpa;
			CComPtr<IMgaMetaAspect> ma;

			rval = parts->get_Item(i,&part);
			rval = part->get_Meta(&mpa);

			rval = mpa->get_ParentAspect(&ma);

			rval = ma->get_Name(&anam);
			bnam = anam;
			if (bnam == name)
				return part;
		} catch (...) {
		};
	};
	return NULL;
};



	

	
		
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de


More information about the gme-users mailing list