void vmsFlashHelper::GetFlashMoviesObjList(IHTMLDocument2Ptr spDoc, LPFLASHLIST pv, BOOL bIncludingFrames) { GetFlashMoviesObjList_noframes (spDoc, pv); if (bIncludingFrames == FALSE) return; IHTMLFramesCollection2Ptr spFrames; spDoc->get_frames (&spFrames); if (spFrames == NULL) return; long lCount = 0; spFrames->get_length (&lCount); for (long i = 0; i < lCount; i++) { CComVariant va ((long)i); CComVariant vaR; spFrames->item (&va, &vaR); if (vaR.pdispVal != NULL) { IHTMLWindow2Ptr spWnd = vaR.pdispVal; if (spWnd != NULL) { IHTMLDocument2Ptr spFDoc; spWnd->get_document (&spFDoc); if (spFDoc != NULL) GetFlashMoviesObjList (spFDoc, pv, TRUE); } } } }
void vmsFlashHelper::SaveFlashMovies(IHTMLDocument2Ptr spDoc, LPCSTR pszFolder, BOOL bIncludingFrames) { SaveFlashMovies_noframes(spDoc, pszFolder); if (bIncludingFrames == FALSE) return; IHTMLFramesCollection2Ptr spFrames; spDoc->get_frames (&spFrames); if (spFrames == NULL) return; long lCount = 0; spFrames->get_length (&lCount); for (long i = 0; i < lCount; i++) { CComVariant va ((long)i); CComVariant vaR; spFrames->item (&va, &vaR); if (vaR.pdispVal != NULL) { IHTMLWindow2Ptr spWnd = vaR.pdispVal; if (spWnd != NULL) { IHTMLDocument2Ptr spFDoc; spWnd->get_document (&spFDoc); if (spFDoc != NULL) SaveFlashMovies (spFDoc, pszFolder, TRUE); } } } }