Zolix2010
February 1st, 2005, 12:19 PM
hi,
im trying to open a document from the documents list but it always returns null.
this is my code:
<code>
// Find .dsp file name
m_ActiveProject->get_FullName(&l_ProjectName);
// Open .dsp file as text document
CComPtr<EnvDTE::Documents> l_pDocuments;
m_pDTE->get_Documents(&l_pDocuments);
CComPtr<EnvDTE::Document> l_pDocument;
l_pDocuments->Open(l_ProjectName,L"Text",false,&l_pDocument);
</code>
am i doing something wrong?
im trying to open a document from the documents list but it always returns null.
this is my code:
<code>
// Find .dsp file name
m_ActiveProject->get_FullName(&l_ProjectName);
// Open .dsp file as text document
CComPtr<EnvDTE::Documents> l_pDocuments;
m_pDTE->get_Documents(&l_pDocuments);
CComPtr<EnvDTE::Document> l_pDocument;
l_pDocuments->Open(l_ProjectName,L"Text",false,&l_pDocument);
</code>
am i doing something wrong?