We have product which get information including projects, compiler flag, linker Flag.. etc from VS2003, 2005, 2008, 2010 .sln file using EvtDTE / VCProjectEngineLibrary.
And this product has been working at PC of many customer. But I was contacted by Some of our customer who said this didn't work.
I received their .sln file, .vcxproj file and try to reappear curcumstance. But It works well at my PC.
why can't get object at their PC..?
Just in case, should have I got all source files from their and tested it?
What are things that may affect getting object from EvtDTE/ VCProjectEngineLibrary?
Failed parts is as follows:
vs 2003
CComPtr<EnvDTE::BuildDependencies> pBuildDeps;
CComPtr<EnvDTE::BuildDependency> pBuildDep; hResult = pBuildDeps->Item(CComVariant(i),&pBuildDep); if(FAILED(hResult)) { throw CS_NVIP_Exception(eNVIP_EH1,_T("Failed Getting Depedency Object.")); } pPrjDepends = new CS_NVIP_PrjDependency; if(pPrjDepends == NULL) { throw CS_NVIP_Exception(eNVIP_EH3,_T("Failed Memory Allocation")); } this->m_arrDependencies.Add((CS_NVIP_IPrjDependency*)pPrjDepends); CComPtr<EnvDTE::Project> pBuildPrj; hResult = pBuildDep->get_Project(&pBuildPrj); <= Failed!! if(FAILED(hResult)) { throw CS_NVIP_Exception(eNVIP_EH1,_T("Faild Getting Project Object")); }
VS 2010
CComPtr<VCLinkerTool> pLinkerTool
VARIANT_BOOL bDelaySign = VARIANT_FALSE;
hResult = pLinkerTool->get_DelaySign(&bDelaySign);
if(FAILED(hResult)) { <= Failed!!
throw CS_NVIP_Exception(eNVIP_EH1,_T("Faild Getting DelaySign."));
}Thanks for your advise..