MFC Access violations / Magneto porting

Hello!
Has anybody here been successful in running EVC 4 generated MFC applications on Magneto?
We're trying to get our many (40+) projects to run on Magneto but run into serious problems:
- When debugging with Platform Builder, we get mfc access violation exceptions. The error do not occur with the same code on Windows Mobile 2003 based devices. It happens whan doing ordinary things like calling CDialog::Create().
- Some applicatinos crash (Access violation exception) even outside of our code. As in it's triggered by MFC code outside of our control.
Is this an imcompatibility between MFC 3.0 and Magneto?
We've also slowly started to port our applications to VS 2005 / MFC 8, but currently that is not going anywhere due to the incredible amount of work needed for a project conversion (remember, 40+ projects....).
So what is your experience with MFC 3 and Magneto so far?
Cheers,
Andre
[943 byte] By [int2str] at [2008-1-29]
# 1
I have almost same problem: MFC application works on unless I try to create dialog. On CDialog::Create process is failing for no particular reason. Same code compiled on PC works fine.

Please share if you managed to find solution .

LeonidFro at 2007-9-8 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 2
Sorry for the delay in asnwering this post.

We have not really looked into supporting MFC 3.0 on WM 5.0 - we recommend migrating to VS 2005 and the 8.0 libraries for WM 5.0 instead.

However, I will try and debug this particular issue and see if there is something either in the OS or the libraries which might help.

I am assuming that creating a simple dialog based application will reproduce this problem.

Thanks,
Sada
Development Lead
VSD Team

SadagopanRajaram at 2007-9-8 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 3
There is an issue with creating dialog classes from templates when running MFC 3.0 applications on WM 5.0. This happens only when the DS_MODALFRAME bit is set on the dialog.

You can rebuild the MFC 3.0 binary by removing the above flag and the access violations related to dialogs should go away.

If I can get more details on the other issues with MFC 3.0, I can take another look and get back to you.

For more details, I have tried to put together a couple of blogs on moving eVC 4.0 applications to VS 2005 and I will keep updating them with more information as I find it.

http://blogs.msdn.com/admin/blogs/posteditor.aspx?App=sada&PostID=498740
http://blogs.msdn.com/admin/blogs/posteditor.aspx?App=sada&PostID=500918

Thanks,
Sadagopan
VSD Development Lead

SadagopanRajaram at 2007-9-8 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 4
Here's another link to your blog:
http://blogs.msdn.com/sada/
GeorgeHenne at 2007-9-8 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...