bool ITunesTrack::podcast() { VARIANT_BOOL podcast = FALSE; IITFileOrCDTrack* fileTrack = 0; HRESULT res = m_comTrack->QueryInterface( IID_IITFileOrCDTrack, (void**)&fileTrack ); if ( res != S_OK || fileTrack == 0 ) { ITunesComWrapper::logComError( res, L"Casting IITrack to IITFileOrCDTrack failed" ); } else { res = fileTrack->get_Podcast( &podcast ); if ( res != S_OK ) { BSTR a; BSTR n; fileTrack->get_Artist( &a ); fileTrack->get_Name( &n ); wstring artist = ITunesComWrapper::bstrToWString( a ); wstring track = ITunesComWrapper::bstrToWString( n ); wostringstream os; os << L"COM couldn't get podcast for " << artist << L" - " << track; ITunesComWrapper::logComError( res, os.str() ); } fileTrack->Release(); } return podcast != FALSE; }