I am getting fatal error in Application.GetForms()
Posted: Mon Apr 16, 2007 5:54 am
Following is the code which gives error.
Application.GetForms();
foreach (Form TempForms in Application.Forms)
{
Form TempForm = Application.FindFormTitle(TempForms.Text);
Trace.Assert(TempForm != null);
//Error arises in the following line
if (TempForm.Element.Class == WindowsForms10.Window.8.app.0.33c0d9d)
{
//Some Statements
}
Error message is:
Fatal ExecutionEngine Error was executed
The runtime has encountered a fatal error. The address of the error was at 0x79e8a634, on thread 0x3fc. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
Application.GetForms();
foreach (Form TempForms in Application.Forms)
{
Form TempForm = Application.FindFormTitle(TempForms.Text);
Trace.Assert(TempForm != null);
//Error arises in the following line
if (TempForm.Element.Class == WindowsForms10.Window.8.app.0.33c0d9d)
{
//Some Statements
}
Error message is:
Fatal ExecutionEngine Error was executed
The runtime has encountered a fatal error. The address of the error was at 0x79e8a634, on thread 0x3fc. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.