Click here to Skip to main content
15,888,212 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have migrated my project from VS2012 to VS2015 and currently I am getting error

#import <msxml.tli>
#import <msxml.tli
>
MSXML::IXMLDOMDocumentPtr gl_pDOMDoc[2] ={NULL,NULL};



C#
try
	{
		ConvertSpecialCharToString(strNewKey );//HSS_03152010
		m_strKeypath  = m_strETool + "//" + strkeyLocalMachine + "//" + strNewKey;
		ProcessKeyPath(m_strKeypath);//SSM_03182010
		
		IXMLDOMNodePtr  pResultnode=NULL;
		pResultnode =gl_pDOMDoc[m_bEnabledEncryption]->selectSingleNode((_bstr_t)m_strKeypath.AllocSysString()); //PDU_03312015  // m_pDOMDoc changed to gl_pDOMDoc[m_bEnabledEncryption]

		if(!pResultnode)
		{
			SearchPathTillCurrentPath(m_strKeypath);			
			bStatus =BS_SUCCESS;
		}
		else
			bStatus = BS_SUCCESS;

	}


C#
catch(...)
	{
		CString strLog;
		strLog.Format("Exception raised while creating key %s" ,m_strKeypath);
		LogError(LINE_INFO + strLog); 
		bStatus = BS_FAIL;
	}






The same code I am using is running successfully in VS2012 but it gives error with VS2015.


I am not able to understand the reason ..?
Posted
Updated 13-Mar-16 4:27am
v4
Comments
CHill60 21-Dec-15 4:56am    
Nor are we. Largely because we can't see your code.
Thakur JAI SINGH 21-Dec-15 5:25am    
Thanks I have updated the code.
KarstenK 21-Dec-15 12:46pm    
selectSingleNode((_bstr_t)m_strKeypath.AllocSysString());
the SysString must be freed. Memory leak!!!

1 solution

try using #import <msxml6.dll> instead.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900