Is this a SP1 "enhancement" of MFC 8.0?
I remember having a hard time trying to port a desktop MFC app to CE
5.0 with VS2005 (without SP1) about a year ago, but didn't notice this
detail. However I'm pretty sure that the configuration didn't include
aygshell, since it would be of no use on an industrial controller and,
most important, it's out of the core license set.
A few days ago I tried to create an MFC project to test a new 6.0 SDK,
but it complained about missing aygshell, trying to compile it just as
it came out of the wizard.
Then I tried to TEMPORARILY comment out that include statement and
found out that yes, it's actually used, I don't know what the hell for
- can someone from MS answer?
Well, MFC is not properly an OS component (actually it was removed
from 6.0), but rather a library that sits on the raw Win32 API.
So, you are not bound to use MFC 8.0 (which can also run on CE 5.0) to
be compatible with CE 6.0, except for the fact that this might be your
only choice. I don't know if there are any legal issues trying to link
the old MFC (available with PB 5.0, but also with EVC++) in a VS2005
app for CE 6.0.
Actually, that's exactly what I did (on CE 5.0) with my MFC app after
a few attempts with MFC 8.0. I had to tweak a bit include and lib
paths and change a few project options. The older MFC is not 100%
compatible with previous desktop versions, but porting was a lot easier.
PROJECT s.a.s. (MSWEP)
Post by Michel Verhagen [eMVP]
"Unfortunately VS2005+SP1 (afxce.h) would like to use it"
So, what he's saying is that HE doesn't try to use aygshell.h, but the
standard afxce.h file is trying to include it. If afxce.h only
*includes* (by mistake) but does not *use* any of the functions in
aygshell.h, then the CE 5.0 mistake of falsely always including
aygshell.h in the SDK will cover up this 2nd mistake of always including
aygshell.h in afxce.h. CE 6.0 did get the SDK right by not including
aygshell.h in the SDK if it wasn't added as a component to the image,
but now the other mistake becomes visible.
Michel Verhagen, eMVP
Check out my blog: http://GuruCE.com/blog
Consultancy, training and development services.
Post by <ctacke/>
Yes, CE 6.0 got it right. CE 5.0 included it by mistake. If aygshell
is not present, having the header doesn't do any good, as it won't
link. If for some crazy reason the lib is there too, then it will
link but die when you try to run.