Hi,
The following code causing an exception in visual studio 2005.It is working fine
with visual studio 2003.
-----------------------------------------------------------------------------------
void CDeleteIt100Dlg::OnBnClickedOk()
{
CString strPath1 = _T("pc106");
CString strPath2 = _T("E:\INETPUB\WWWROOT\OrchestraCM");
Test(strPath1,strPath2);
OnOK();
}
void CDeleteIt100Dlg::Test(CString &strPath1,CString &strPath2)
{
try
{
CString str;
str.Format(_T("\\\\%s%\\%s"),strPath1,strPath1);
}
catch(CException *exc)
{
int a = GetLastError();
}
}
-----------------------------------------------------------------------------------
The above code causing an exception as
---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Assertion Failed!
Program: ...
File: f:\rtm\vctools\crt_bld\self_x86\crt\src\output.c
Line: 1123
Expression: (state != ST_INVALID)
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
---------------------------------------------------------------------------------
Please help me.
Thanks in advance.