void CFontInstaller::UninstallFonts() { if(pRemoveFontMemResourceEx) { std::vector<HANDLE>::iterator it; for(it = m_fonts.begin(); it != m_fonts.end(); ++it) { pRemoveFontMemResourceEx(*it); } m_fonts.clear(); } }
void CFontInstaller::UninstallFonts() { if (pRemoveFontMemResourceEx) { POSITION pos = m_fonts.GetHeadPosition(); while (pos) { pRemoveFontMemResourceEx(m_fonts.GetNext(pos)); } m_fonts.RemoveAll(); } if (pRemoveFontResourceEx) { POSITION pos = m_files.GetHeadPosition(); while (pos) { CString fn = m_files.GetNext(pos); pRemoveFontResourceEx(fn, FR_PRIVATE, 0); if (!DeleteFile(fn) && pMoveFileEx) { pMoveFileEx(fn, NULL, MOVEFILE_DELAY_UNTIL_REBOOT); } } m_files.RemoveAll(); } }