Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
W

weifirst

@weifirst
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • the question that relate to CreateInstance
    W weifirst

    thanks. this query is resolves. it is not relate com, it is other question.

    sdfdsfsd

    ATL / WTL / STL database question

  • Equivalent for CPtrList in ATL
    W weifirst

    CPtrList is not in c++, it is in vc++

    sdfdsfsd

    ATL / WTL / STL c++

  • the question that relate to CreateInstance
    W weifirst

    The following code is correct: FRLE_FALSE(m_pRssManager.CreateInstance(RssLib::CLSID_RssManager),_T("can't create RssManager object")); CString sRssDBFile = (LPCTSTR)(GlobalSet::g_sRootPath + _T("\\DB\\RssTab.mrr")); try{ m_pRssManager->Open((LPCTSTR)sRssDBFile); } catch(...) { MessageBox(::AfxGetMainWnd()->m_hWnd, _T("database file is already damaged,will create a new empty database file"),_T("message"),MB_OK|MB_ICONINFORMATION); CString sRssDBTemplateFile = (LPCTSTR)(GlobalSet::g_sRootPath + _T("\\NewRssTab.mrr")); if( ::PathFileExists(sRssDBTemplateFile) ){ ::CopyFile(sRssDBTemplateFile, sRssDBFile, FALSE); RssLib::IRssManagerPtr pRssManager; FRLE_FALSE(pRssManager.CreateInstance(RssLib::CLSID_RssManager),_T("can't create RssManager object")); pRssManager->Open((LPCTSTR)sRssDBFile); m_pRssManager = pRssManager; } } the following code is not correct: FRLE_FALSE(m_pRssManager.CreateInstance(RssLib::CLSID_RssManager),_T("can't create RssManager object")); CString sRssDBFile = (LPCTSTR)(GlobalSet::g_sRootPath + _T("\\DB\\RssTab.mrr")); try{ m_pRssManager->Open((LPCTSTR)sRssDBFile); } catch(...) { MessageBox(::AfxGetMainWnd()->m_hWnd, _T("database file is already damaged,will create a new empty database file"),_T("message"),MB_OK|MB_ICONINFORMATION); CString sRssDBTemplateFile = (LPCTSTR)(GlobalSet::g_sRootPath + _T("\\NewRssTab.mrr")); if( ::PathFileExists(sRssDBTemplateFile) ){ ::CopyFile(sRssDBTemplateFile, sRssDBFile, FALSE); m_pRssManager ->Open((LPCTSTR)sRssDBFile); } } May I ask the reason ? Why have to recreate the RssManager object ? thanks a lot!

    sdfdsfsd

    ATL / WTL / STL database question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups