CE_ACTIVEX was not defined because this Windows CE SDK does not have DCOM
I have a large CE workspace that I migrated from CE 4.0 to CE 5.0 using the built in conversion tool in VS 2005. When I try to compile any of the COM dll's I get the following series of messages:
1>_CE_ACTIVEX was not defined because this Windows CE SDK does not have DCOM.1> _CE_ACTIVEX could be caused to be defined by defining _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA, but it is recommended that this be done only for single-threaded apps.
1>_ATL_NO_HOSTING was defined because _CE_ACTIVEX was not defined.
1>WINVER was defined to be 0x0400, as it was either not set or set to a lower value
1>F:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\atlhost.h(43) : fatal error C1189: #error : atlhost.h requires Hosting support (_ATL_NO_HOSTING is defined). For Windows CE platforms without DCOM support, _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA needs to be defined.
Most of these COM objects are single threaded some are not.
What do I need to do to correct this correctly and why?
Alicia
Answers
- Hi Alicia,
This is a question that I've seen a few times, and I've just posted a blog entry on it here: http://blogs.msdn.com/jeffabraham/archive/2005/10/10/479390.aspx. The key takeaway is that you need to review your code for correctness in the case that multiple threads are running, and ensure that calls are made on the correct thread. It is safe to define this symbol if you are running a single threaded app, or you have reviewed your code for correctness in light of the COM implementation for the device you are targeting. Thanks,
Jeff Abraham
Visual Studio
All Replies
- Hi Alicia,
This is a question that I've seen a few times, and I've just posted a blog entry on it here: http://blogs.msdn.com/jeffabraham/archive/2005/10/10/479390.aspx. The key takeaway is that you need to review your code for correctness in the case that multiple threads are running, and ensure that calls are made on the correct thread. It is safe to define this symbol if you are running a single threaded app, or you have reviewed your code for correctness in light of the COM implementation for the device you are targeting. Thanks,
Jeff Abraham
Visual Studio - But I'm not using COM. I'm just using ATL::CRegKey.
IIRC this pragma isn't smart enough to determine if you are using COM, so it errs on the side of caution. If you aren't doing anything COM related, then you can very safely define the symbol. You could also potentially log a ladybug issue on this if you think it's serious. Thanks,
Jeff Abraham
Visual Studio- And just to be clear, what symbol would that be? CE_ACTIVEX or the one mentioned in the message as being able to cause CE_ACTIVEX to be defined?
You can safely define the one mentioned in the message as being able to cause CE_ACTIVEX to be defined. Cheers!
Jeff


