Page 1 of 1

Abnormal Program Termination

Posted: Wed Oct 23, 2002 9:27 pm
by Urban AvierfjÀrd
Hi EveryBody
I have a Problem with Abnormal
Program Termination.

I get the Error Message:
Project FiveInaRow.exe raised exception
class EWin32Error with message 'Win32 Error.
code 1400 Invalid Window Reference(handle)

When the Debug function takes over it
Stops at:
/* TCustomForm.Destroy */ inline__fastcall virtual
~TForm(void) {}

Verry Thankfull for Tips or Advice.

Sincerely
Urban Avierfj?rd(Alchemy727)
Visby,Gotland,Sweden
ICQ#69907743
HomePage http://www.alcemy727.com
E-Mail [email protected]

Re:Abnormal Program Termination

Posted: Thu Oct 24, 2002 10:01 am
by ark
It looks like an EWin32Error exception was thrown somewhere in your program but nothing caught it. The only thing I can suggest for you to do is find which function call in your program is causing the exception to be thrown. Try something like this:

Code: Select all

try
{
    someFunction();
}
catch(EWin32Error e)
{
    MessageBox(NULL, e.what(), "Exception", MB_OK);
}
When you find out where the exception is being thrown, find out what functions the exception-thrower is calling, and then see which of them is throwing the exception with the same method. Repeat until you've found exactly where the problem is occurring. The problem itself appears to be that some wrapper function for a Win32 function is being passed an HWND that doesn't refer to a valid window, and when it tests whether the window handle is valid, the test fails, so it throws an exception rather than trying to perform an operation on something that isn't a window.