NO

Author Topic: A question about versions....  (Read 2917 times)

CommonTater

  • Guest
A question about versions....
« on: April 23, 2012, 09:53:19 PM »
Is there any correlation between Windows headers supplied with Pelles C and Window's versions?
 
For example:  If I were programmming on XP... should I be using Version 5? 
 
Thanks.
 
 

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: A question about versions....
« Reply #1 on: April 23, 2012, 11:30:20 PM »
I can't think of one, since defining WINVER should be enough to specify the minimum Windows release.
---
Stefan

Proud member of the UltraDefrag Development Team

CommonTater

  • Guest
Re: A question about versions....
« Reply #2 on: April 23, 2012, 11:34:24 PM »
Thanks Stephan...  WINVER... good to know.

This is the first time this concern came up as my "client" wanted me to ensure that his project would work on XP and it crossed my mind that versions of the headers (and libs) that post date XP may have stuff XP can't do in them...
 




 

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: A question about versions....
« Reply #3 on: April 24, 2012, 12:43:11 AM »
If WINVER is not defined, it will default to 0x0500, which is Win2k, see windef.h

WINVER is used to enable additional structure members for higher Windows versions and to use different API functions based on the minimum supported Windows version.

The OpenFileName structure would be an example of defining additional members for _WIN32_WINNT greater than or equal to 0x0500.

It even seems that _WIN32_WINNT is used for the majority of version checks in header files.
---
Stefan

Proud member of the UltraDefrag Development Team

CommonTater

  • Guest
Re: A question about versions....
« Reply #4 on: April 24, 2012, 03:07:30 AM »
If WINVER is not defined, it will default to 0x0500, which is Win2k, see windef.h

WINVER is used to enable additional structure members for higher Windows versions and to use different API functions based on the minimum supported Windows version.

The OpenFileName structure would be an example of defining additional members for _WIN32_WINNT greater than or equal to 0x0500.

It even seems that _WIN32_WINNT is used for the majority of version checks in header files.

Wow... now this I wasn't aware of...
Strange thing is I've been using structs and things as you describe with additional or different features, without defining winver... odd...

I feel some reading coming on... :D 

Thanks again.