0 Members and 1 Guest are viewing this topic.
the str File name is certainly an existing File.I get it from FileInfo object,but it's a playing File,is this the problem? my program is big, hard to make a sample.
HRESULT hr = S_OK; IAIMPFileInfo* fi; IAIMPString* str; IAIMPServiceFileTagEditor* fts; IAIMPFileTagEditor* te; if (FAILED(pPlugin->aimp3_player->GetInfo(&fi))) return 0; if (FAILED(fi->GetValueAsObject(AIMP_FILEINFO_PROPID_FILENAME, IID_IAIMPString,(void**)&str))) { fi->Release(); return 0; } // AfxMessageBox(str->GetData()); hr = aimp3_core_unit_->QueryInterface(IID_IAIMPServiceFileTagEditor, (void**)(&fts)); if (S_OK != hr) { fi->Release(); str->Release(); return 0; } //AfxMessageBox(str->GetData()); hr = fts->EditFile(str, IID_IAIMPString, (void**)&te);//error //hr = fts->EditTag(str, AIMP_FILETAG_ID_ID3v2,IID_IAIMPFileTagEditor, (void**)&te); //AfxMessageBox(_T("hi")); if (FAILED(hr)){ fi->Release(); fts->Release(); str->Release(); CString strmsg; strmsg.Format(_T("queryinterface failed:%x"), hr);//E_NOINTERFACE//E_INVALIDARG AfxMessageBox(strmsg); return 0; } fi->Release(); str->Release(); if (FAILED(te->GetMixedInfo(&fi))){ te->Release(); fts->Release(); return 0; }