<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6249.1">
<TITLE>RE: Re: WinCE port</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Verdana">Andrey,</FONT>
</P>
<P><FONT SIZE=2 FACE="Verdana">> It seems that the _WIN32_WCE constant is not exactly what I need:</FONT>
<BR><FONT SIZE=2 FACE="Verdana">> </FONT>
<BR><FONT SIZE=2 FACE="Verdana">> E:\>cat t.c</FONT>
<BR><FONT SIZE=2 FACE="Verdana">> #include <stdio.h></FONT>
<BR><FONT SIZE=2 FACE="Verdana">> </FONT>
<BR><FONT SIZE=2 FACE="Verdana">> int main()</FONT>
<BR><FONT SIZE=2 FACE="Verdana">> {</FONT>
<BR><FONT SIZE=2 FACE="Verdana">> printf("%d\n", _WIN32_WCE);</FONT>
<BR><FONT SIZE=2 FACE="Verdana">> return 0;</FONT>
<BR><FONT SIZE=2 FACE="Verdana">> }</FONT>
<BR><FONT SIZE=2 FACE="Verdana">> </FONT>
<BR><FONT SIZE=2 FACE="Verdana">> E:\>cl t.c</FONT>
<BR><FONT SIZE=2 FACE="Verdana">> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86</FONT>
<BR><FONT SIZE=2 FACE="Verdana">> Copyright (C) Microsoft Corp 1984-1998. All rights reserved.</FONT>
<BR><FONT SIZE=2 FACE="Verdana">> </FONT>
<BR><FONT SIZE=2 FACE="Verdana">> t.c</FONT>
<BR><FONT SIZE=2 FACE="Verdana">> t.c(9) : error C2065: '_WIN32_WCE' : undeclared identifier</FONT>
<BR><FONT SIZE=2 FACE="Verdana">> </FONT>
<BR><FONT SIZE=2 FACE="Verdana">> It is not built-in constant. Do you know where it is defined?</FONT>
</P>
<P><FONT SIZE=2 FACE="Verdana">I don't think that it is #define-d in any header file, but instead magically appears in the CL command-line depending on the build configurations used in eVC++. So, trying to use it in VC++, as above, will not work. There is some more information here, under the heading "The $(CePlatform) Macro": </FONT><A HREF="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppc2k/html/ppc_ource.asp"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Verdana">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppc2k/html/ppc_ource.asp</FONT></U></A><FONT SIZE=2 FACE="Verdana"> You can see the following in the eVC++ screenshot: "… /D _WIN32_WCE=$(CEVersion) ...".</FONT></P>
<P><FONT SIZE=2 FACE="Verdana">We always use it something like this:</FONT>
</P>
<P><FONT SIZE=2 FACE="Verdana">#ifdef _WIN32_WCE</FONT>
<BR><FONT SIZE=2 FACE="Verdana">#if _WIN32_WCE < 300</FONT>
</P>
<P><FONT SIZE=2 FACE="Verdana">…</FONT>
</P>
<P><FONT SIZE=2 FACE="Verdana">#endif</FONT>
<BR><FONT SIZE=2 FACE="Verdana">#endif</FONT>
</P>
<P><FONT SIZE=2 FACE="Verdana">Regards,</FONT>
<BR><FONT SIZE=2 FACE="Verdana">Martin Daly,</FONT>
<BR><FONT SIZE=2 FACE="Verdana">Technical Director,</FONT>
<BR><B><FONT SIZE=2 FACE="Verdana">Cadcorp</FONT></B>
</P>
</BODY>
</HTML>