Where is _WIN32_WCE defined?

Colibri VF61
CE6 and CE7

We have conditionally-compiled code that runs on two platforms. I used to be able to tell which platform was being compiled with the following:

#if _WIN32_WCE < 0x600
#define PXA27X
#define _PLATFORM_FT4
#define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA
#endif
#if _WIN32_WCE >= 0x600
#define _PLATFORM_TORADEX
#endif // _WIN32_WCE < 600

This no longer works. Is _WIN32_WCE no longer being defined in the SDK? What is the proper way of determining the CE version?

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

The _WIN32_WCE macro is a predefined macro in Windows CE (Windows Embedded Compact) SDKs that indicates the version of Windows CE for which the application is being compiled. This macro is typically defined in the SDK header files, and its value corresponds to the version of Windows CE. For example, for Windows CE 6.0, _WIN32_WCE would be defined as 0x600.

If you are finding that _WIN32_WCE is no longer being defined, it could be due to several reasons:

  1. Changes in the SDK: It’s possible that newer versions of the SDK have changed how or where this macro is defined. Ensure you are including the correct headers in your project.
  2. Project Configuration: Verify that your project is correctly configured to use the intended Windows CE SDK and that the include paths are correctly set up to reference the SDK headers where _WIN32_WCE is defined.
  3. Conditional Compilation: Ensure that there are no conditional compilation directives inadvertently preventing the definition of _WIN32_WCE from being included.

To determine the CE version properly, you should:

  • Ensure that your project setup or environment is correctly configured to include and use the Windows Embedded Compact SDK headers.
  • Check the SDK documentation or header files to confirm where and how _WIN32_WCE is defined. It’s typically in a common header file included by most or all projects targeting Windows CE.

If you’re working within a Toradex context, while your question pertains to Windows Embedded Compact, which is supported on some Toradex modules like the Colibri VF61, the specifics of handling _WIN32_WCE would generally align with standard Windows CE SDK practices. For Toradex-specific configurations or issues, ensuring that you’re using the correct version of the Toradex Windows CE SDK and following the Toradex module’s documentation for Windows CE development is crucial.

For issues strictly related to Toradex hardware and Torizon software, focusing on Linux environments, the approach and tools would differ significantly from Windows Embedded Compact development.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Colibri VF61 | Toradex Developer Center.

I have done a search of \Program Files (x86)\Windows CE Tools\SDKs\Toradex_CE700\ and there are no hits on defining _WIN32_WCE.

Please use the CE_MAJOR_VER and CE_MINOR_VER defined at bldver.h

#define CE_MAJOR_VER 0x0007
#define CE_MINOR_VER 0x0000 // Minor version is in hundredths

Thanks for the solution.