#if (_WIN32_WINNT >= 0x0400)
and apparently _WIN32_WINNT is not set on my machine.
I have NT 4.0. I also had a friend check and it's not set on his machine
either. Anyone know about this ?
Thanks,
Deanna
Taken straight from the MSDN which I'd suggest you consult before
posting to the newsgroups:
Header File Conventions
This SDK can be used to target applications for Microsoft® Windows®
95, Microsoft® Windows NT® 4.0, Microsoft® Windows® 98, and Microsoft®
Windows® 2000 using the header file conventions below.
The makefiles generated by Microsoft® Visual C++® 5.0 and 6.0 target
Windows NT 3.51 by default. Therefore, to use functions introduced in
Windows NT 4.0 or later, which are protected by conditional code, you
must define the appropriate macros. Otherwise, you will receive the
following error message from the compiler: error C2065: undeclared
identifier. You may also need to ensure that the INCLUDE environment
variables has the path to the SDK header files listed before the path
to the Visual C++ header files. Otherwise, you will receive error
C2065 for items that were introduced after Visual C++ was released.
The following table indicates the macros you must define to target
each system using the SDK headers.
Minimum System Required Macros to Define
Windows 95 and Windows NT 4.0 WINVER=0x0400
Windows 98 and Windows NT 4.0 _WIN32_WINDOWS=0x0410 and WINVER=0x0400
Windows NT 4.0 _WIN32_WINNT=0x0400 and WINVER=0x0400
Windows 98 and Windows 2000 WINVER=0x0500
Windows 2000 _WIN32_WINNT=0x0500 and WINVER=0x0500
Internet Explorer 3.0 _WIN32_IE=0x0300
Internet Explorer 4.0 _WIN32_IE=0x0400
Internet Explorer 5.0 _WIN32_IE=0x0500
Note: Setting WINVER to 0x0500 implies _WIN32_IE=0x0400.
If you are writing your own makefile, the macros in WIN32.MAK can help
you use the correct conventions. The value of _WIN32_WINNT is set in
WIN32.MAK, depending on the platform you choose to target. By default,
WIN32.MAK defines _WIN32_WINNT as 0x0400. By default, WIN32.MAK sets
_WIN32_IE to 0x0300 if it is not already defined. To take advantage of
the new features introduced in Internet Explorer 4.0, such as new
common controls, define _WIN32_IE as 0x0400. For more information, see
Building Applications Using WIN32.MAK.
If you do not include WIN32.MAK in your makefile, you need to
explicitly define _WIN32_WINNT as 0x0500 to get the Windows
2000-specific material from the header files.
The SDK headers use guard statements to determine the system on which
each function is supported. The following table describes these
statements.
Guard Statement Meaning
#if _WIN32_WINNT >= 0x0400 Windows NT 4.0 and later. It is not
implemented in Windows 95.
#if _WIN32_WINDOWS >= 0x0410 Windows 98. The image may not run on
Windows 95.
#if _WIN32_WINNT >= 0x0500 Windows 2000. The image may not run on
Windows 95/98 or Windows NT.
#if WINVER >= 0x0500 Windows 2000 and Windows 98. The image may not
run on Windows 95 or Windows NT.
#if _WIN32_IE >= 0x0300 Internet Explorer 3.0 and later.
#if _WIN32_IE >= 0x0400 Internet Explorer 4.0 and later.
#if _WIN32_IE >= 0x0500 Internet Explorer 5.0 and later.
There are functions in Windows 95 OEM Service Release 2 that are
guarded by (_WIN32_WINNT >= 0x0400), such as the Crypto API. If you
are writing an application specifically for Windows 95 OEM Service
Release 2, and you want the header files to provide compile time
access to these functions, it is necessary to define _WIN32_WINNT as
0x0400. Note that an application that uses these functions will not
run correctly on the retail release of Windows 95. In general,
applications expected to run on Windows 95 should be
Regards,
'''
@ @
+========================ooO-(_)-Ooo================================+
| PJ Naughter |
| |
| Software Developer Home Email: p...@indigo.ie |
| Softech Telecom Work Email: pj.na...@softech-telecom.com |
| Web: http://indigo.ie/~pjn |
| ICQ: 25413168 |
| |
+===================================================================+
OK, maybe I came across too strong, but a simple search of the MSDN or
books online would have found the info in seconds saying both yourself
and others the time on newsgroups. A list of suggested sources are:
1. Books Online
2. MSDN / Platform SDk / KB
3. support.microsoft.com (in case it was a newly added article not on
the CD's you have).
4. www.deja.com
5. www.codeguru.com
6. newsgroups.
Again, I'm sorry.
Deanna