Re: about Exception
Hello!
I can add some more information about my problem.
The code that is calling this MFC dll is a C# asp.net application running on
a IIS.
We have a try catch block sorrounding the call to the MFC dll.
The catch handler in C# asp.net application report the following error when
the catch block was called
because the MFC DLL throw an exception.
The following error was reported.
#Exception type: System.AccessViolationException
#Exception message: Attempted to read or write protected memory. This is
often an indication that other memory is corrupt.
#Exception details:
at DTHTOOLOBJECTSLib.SyntaxObjClass.InitRules(String Provider, String
Datasource, String UserID, String Password, String ProductID, String
Revision, String ApplicationID, String ApplicationRev, String subfileid)
at SubfileLine.CheckSyntax(String productID, String revision, String
applicationID, String applicationRevision,
Another interesting thing is that if I build the MFC in debug I will never
get any kind of run time error.
So this sound very strange. I know that DS.Open is throwing an execption
because this statement is the only one
but how is it possible that it work when the DLL is being build in debug.
Does anybody have any kind of explanation because I become run out of ideas.
//Tony
"markym" <no@email.com> wrote in message
news:%23A%23a5XBQJHA.420@TK2MSFTNGP03.phx.gbl...
Tony Johansson wrote:
Hello!
I have one short question is this statement below able to thow an
execption
that I can catch.
hr = DS.Open(strtemp, &dbInit);
If this statement is able to throw an exception how do I write to catch
all
execption and what header file must be included
Without knowing what DS is I would suggest you to try it i.e.
try
{
hr = DS.Open(strtemp, &dbInit);
}
catch(...)
{
TRACE(_T("Caught it.")); }