System.Threading.ThreadAbortException
-
I have a problem I don't understand. I have a native C++ DLL that exports a createXY function. This one creates an Object of type XY. :) Then I build a wrapper in Managed C++
public __gc class clsNGramWrapper
{
protected:
ISimpleIndexBuilder * _IB;
public:
clsNGramWrapper();
~clsNGramWrapper();
bool addDocument(System::String * strDoc);
ArrayList * search(System::String * str);}; public \_\_gc class clsSearchResult { public: System::String \* \_sText; double \_dRelevance; };
and the constructor looks like this:
clsNGramWrapper::clsNGramWrapper() {
HMODULE hDLL = ::LoadLibrary("./nGram.dll");
UINT err = GetLastError();
typedef ISimpleIndexBuilder*(*builderFunc)(void);
builderFunc createSI = (builderFunc)::GetProcAddress(hDLL, "createSimpleIndexBuilder");
_IB = createSI();
}ISimpleIndexBuilder is a class with only some pure virtual methods. In the ASP App, I create an instance of the wrapper int the PageLoad Event. After PageLoad I get an ThreadAbortException, the Application is closed and I loose all the Session and Application State objects. :sigh: What I done wrong? Maybe the wrapper thing?
-
I have a problem I don't understand. I have a native C++ DLL that exports a createXY function. This one creates an Object of type XY. :) Then I build a wrapper in Managed C++
public __gc class clsNGramWrapper
{
protected:
ISimpleIndexBuilder * _IB;
public:
clsNGramWrapper();
~clsNGramWrapper();
bool addDocument(System::String * strDoc);
ArrayList * search(System::String * str);}; public \_\_gc class clsSearchResult { public: System::String \* \_sText; double \_dRelevance; };
and the constructor looks like this:
clsNGramWrapper::clsNGramWrapper() {
HMODULE hDLL = ::LoadLibrary("./nGram.dll");
UINT err = GetLastError();
typedef ISimpleIndexBuilder*(*builderFunc)(void);
builderFunc createSI = (builderFunc)::GetProcAddress(hDLL, "createSimpleIndexBuilder");
_IB = createSI();
}ISimpleIndexBuilder is a class with only some pure virtual methods. In the ASP App, I create an instance of the wrapper int the PageLoad Event. After PageLoad I get an ThreadAbortException, the Application is closed and I loose all the Session and Application State objects. :sigh: What I done wrong? Maybe the wrapper thing?
Hi there, The ThreadAbortException exception is thrown when the execution of the page is ended unexpectedly(the current thread of the web application is aborted). Can you put the code of the wrapper class in the try/catch block to see what actually is happening?