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
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
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);
}
Topic
Forum Locked
Send Topic to a Friend
Printer Friendly
Jump To:
Select Forum
Documentation
White Papers
Documentation
Announcements and Public Posts
Hardware
General Hardware, ADSmartIO, Digital I/O and A/Ds
Cables and Connectors
Displays
Ethernet, IR, Serial, CAN and high speed data
Microsoft Windows CE
The Basics (CE)
CE FAQ
General CE
CE Downloads and Documents
eVC Application Development
CE Sample Applications and Utilities
eVB Application Development
.NET Application Development
CE Drivers
CE Flash, CF and PCMCIA
CE Audio and Multimedia
Embedded Linux
Linux Open Discussion
Linux FAQ
Linux Downloads and Documents
Atom Catalyst
Linux for Atom-based products
Atom Firmware
Atom FAQ
Windows Embedded Standard
Microsoft Windows CE for Atom
Catalyst Discussion
Zypad
Zypad Discussion
Microsoft Windows CE
Documents and Downloads
Other Operating Systems
VxWorks FAQ
VxWorks Discussion
OS-9 FAQ
--------------------
Home
Active Topics
Frequently Asked Questions
Member Information
Search Page
Eurotech Support Forums
© Eurotech Inc.
This page was generated in 0.02 seconds.
Snitz Forums 2000