[gme-users] unknown error code after IMgaMetaAspect::get_Name
Peter Volgyesi
peter.volgyesi at vanderbilt.edu
Mon Aug 23 17:43:25 CDT 2004
Indexes in MGA collections (or other COM collections) are started with 1
instead of 0 for some intricate reason.
--
peter
> -----Original Message-----
> From: gme-users-bounces at list.isis.vanderbilt.edu
> [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf
> Of Stefan Marte
> Sent: Monday, August 23, 2004 4:13 PM
> To: gme-users at list.isis.vanderbilt.edu
> Subject: [gme-users] unknown error code after IMgaMetaAspect::get_Name
>
> 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
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
More information about the gme-users
mailing list