本文介绍了如何将EnvDTE :: Project转换为VCProject的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发用C ++编写的VS2010软件包,但在转换EnvDTE :: Project时遇到了麻烦.到VCProject.

I'm working on a package for VS2010 written in C++, and am having trouble Converting EnvDTE::Project  to VCProject. 

        CString ppPathStr = m_PPCreator.m_project + m_PPCreator.m_ppname +'\\'+ m_PPCreator.m_ppname;
        CComQIPtr< EnvDTE :: _ Solution> cur_solution;
        dte-> get_Solution(& cur_solution),cur_solution;
        cur_solution-> Open(CComBSTR((LPCTSTR)(ppPathStr +".sln"))));

         CString ppPathStr = m_PPCreator.m_project + m_PPCreator.m_ppname + '\\' + m_PPCreator.m_ppname;
         CComQIPtr< EnvDTE::_Solution > cur_solution;
         dte->get_Solution( &cur_solution ), cur_solution;
         cur_solution->Open(CComBSTR((LPCTSTR) (ppPathStr + ".sln")));

       CComQIPtr< EnvDTE :: Project> pProject;
        CComQIPtr< EnvDTE :: Projects> projs;
        cur_solution-> get_Projects(& projs);

        projs-> Item(CComVariant(1),& pProject);      
        CComQIPtr< VC项目> prj;

        CComQIPtr< EnvDTE::Project > pProject;
         CComQIPtr< EnvDTE::Projects > projs;
         cur_solution->get_Projects( &projs );

         projs->Item( CComVariant( 1 ), & pProject);       
         CComQIPtr< VCProject > prj;

prj = pProject;

prj = pProject;

prj-> AddFile(CComBSTR((LPCTSTR)(ppPathStr + .cpp)),pDisp);

 prj->AddFile(CComBSTR((LPCTSTR) (ppPathStr +.cpp")),pDisp);

这时我出错了.

 

推荐答案

 

Ryan


这篇关于如何将EnvDTE :: Project转换为VCProject的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 13:17