All Forums
 Microsoft Windows CE
 .NET Application Development
 Error message: data abort when create child window
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

Arcnet

23 Posts

Posted - 25 Dec 2003 :  11:04:42  Show Profile  Email Poster
Hello everybody.

We have "BitsyX" with WinCE 4.2 Ver.(4.20.01)

One of our applications written on C# uses MFC dll.

In the dll we must create window as a child of main C#-form.

We get handle of C#-form with the next code:

//////////////////////////////////////////////////////////////////
[DllImport("coredll.dll")]
private static extern IntPtr SetCapture ( IntPtr hWnd );

[DllImport("coredll.dll")]
private static extern IntPtr GetCapture ();

public static IntPtr GetHWND ( Control ctrl )
{
IntPtr hOldWnd = GetCapture ();
ctrl.Capture = true;
IntPtr hWnd = GetCapture ();
ctrl.Capture = false;
SetCapture( hOldWnd );
return hWnd;
}
////////////////////////////////////////////////////////////////////

We pass this handle into dll as int*, and in dll

and declarate the parent window:

/////////////////////////////////////////////////////////////////////

CWnd* pParentWnd = NULL;
pParentWnd = new CWnd ();

pParentWnd->Attach ( (HWND)pParent ); // pParent - the passed handle

/////////////////////////////////////////////////////////////////////

We create child window OK, but from debug (COM 3) port we get the

next message:

------------------------------------------------------------------
Data Abort: Thread=82d3323c
Proc=81167d28 'OUR_Application.exe'
AKY=00000801 PC=035844ad RA=035844a9 BVA=18000028 FSR=00000007
------------------------------------------------------------------

What does it mean?

Thanks.

jbaik

22 Posts

Posted - 29 Dec 2003 :  09:33:23  Show Profile  Email Poster
You will see Data Abort when your application violates memory access such as acessing NULL Pointer, Data Alignment Error.
You may cactch this error with the following routine.

try {
SetCapture( hOldWnd );
}
catch (Exception e) {
Console.WriteLine("Exception from SetCapture : " + e.Message);
}
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.02 seconds. Snitz Forums 2000