try
{
........................
}
catch(_com_error &e)
{
CString strErrDescribe;
strErrDescribe.Format("Exception thrown for classes generated by #import"
"\tCode =%81x\n"
"\tCode meaning =%s\n"
"\tSource =%s\n"
"\tDescription =%s\n",
e.Error(),
e.ErrorMessage(),
(LPCTSTR)(e.Source()),
(LPCTSTR)(e.Description()));
TRACE("%s %s\r\n", (LPCTSTR)e.Source(),(LPCSTR)e.Description());
char sLog[1024]= {0};
sprintf(sLog, "%s %s %s", e.ErrorMessage(),(LPCTSTR)e.Source(), (LPCSTR)e.Description());
............
}
catch(...)
{
.......
}