Below I copied and pasted contents of the targetver.h file of a VC 2008
project I created. There are three different minimum requirements listed
for Windows. How does that work?

Daniel

Re: why more than one min requirement in targetver.h by Daniel

Daniel
Wed Jul 23 06:36:32 CDT 2008

Sorry. I forgot to paste it.

#ifndef WINVER // Specifies that the minimum required platform is Windows
Vista.

#define WINVER 0x0600 // Change this to the appropriate value to target
other versions of Windows.

#endif

#ifndef _WIN32_WINNT // Specifies that the minimum required platform is
Windows Vista.

#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to
target other versions of Windows.

#endif

#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is
Windows 98.

#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to
target Windows Me or later.

#endif

#ifndef _WIN32_IE // Specifies that the minimum required platform is
Internet Explorer 7.0.

#define _WIN32_IE 0x0700 // Change this to the appropriate value to target
other versions of IE.

#endif



"Daniel" <newsonly@cableone.net> wrote in message
news:OwvhncL7IHA.3260@TK2MSFTNGP03.phx.gbl...
> Below I copied and pasted contents of the targetver.h file of a VC 2008
> project I created. There are three different minimum requirements listed
> for Windows. How does that work?
>
> Daniel
>



Re: why more than one min requirement in targetver.h by Igor

Igor
Wed Jul 23 06:56:14 CDT 2008

"Daniel" <newsonly@cableone.net> wrote in message
news:OwvhncL7IHA.3260@TK2MSFTNGP03.phx.gbl
> Below I copied and pasted contents of the targetver.h file of a VC
> 2008 project I created. There are three different minimum
> requirements listed for Windows. How does that work?

The reasons are largely historical. Different macros to identify a
targeted Windows version were introduced over a long time, and now all
of them are being used by existing code in any number of combinations.
So, in order not to break old code, all of them must be defined and kept
in sync.

See also http://msdn.microsoft.com/en-us/library/aa383745.aspx . With
newer SDK versions, you can define a single NTDDI_* macro appropriate
for your project (e.g. in project properties), and SDK headers will
define all the legacy macros based on that.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925



Re: why more than one min requirement in targetver.h by Alex

Alex
Wed Jul 23 07:04:58 CDT 2008

"Daniel" wrote:
> Below I copied and pasted contents of the targetver.h file of a
> VC 2008 project I created. There are three different minimum
> requirements listed for Windows. How does that work?

It cuts out any declaration from PSDK headers that is bellow
required target version. See more info here:

"Using the Windows Headers"
http://msdn.microsoft.com/en-us/library/aa383745.aspx

HTH
Alex