try/catch unreachable code C2407 migrating from vs 6.0 to vs 7.1 .NET
From: michael (mbiagioni_at_cox.net)
Date: 07/01/04
- Next message: Jan Bares: "Re: _beginthreadex VS CreateThread in vc 7.1"
- Previous message: mphanke: "Re: Resource in a dll"
- Messages sorted by: [ date ] [ thread ]
Date: 1 Jul 2004 04:29:00 -0700
I am migrating C++ unmanaged to managed VC 7.1. I continue to have
problems with try catch blocks through-out my code. The compile tells
me the the code is unreachable C2407 at the catch portion of the
block. I am using /clr /EHsc switches. The class does not have the
prefix "public _gc class CAccountExposure :
System::Windows::Forms::Form " but "class CAccountExposure : public
CDialog." The following is a snippet of code representing the problem:
try
{
statements that automate excel
}
catch(COleException *e)
{
char buf[500];
sprintf(buf, "COleException. SCode: %60x. ", (long)e->m_sc);
::MessageBox(NULL, buf, "COleException", MB_SETFOREGROUND | MB_OK);
}
mbiagion@travelers.com
- Next message: Jan Bares: "Re: _beginthreadex VS CreateThread in vc 7.1"
- Previous message: mphanke: "Re: Resource in a dll"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|