WINVER relevance? |
Post Reply |
Author | |
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Posted: 07 July 2009 at 3:14am |
I usually set WINVER=0x0500 (and _WIN32_WINNT=0x0500), since I seldom use XP+ features.
Does this guarantee that the code runs on Windows 2000?
At work, in a large project, WINVER was set to 0x0500 - everywhere. I checked stdafx.h, Project Settings etc. Later, when we ran the executable on Windows 2000 SP4, we found out that a kernel32 function was missing: TzSpecificLocalTimeToSystemTime.
Looking through Winbase.h, it's clear that this function is indeed inside an #ifdef:
#if _WIN32_WINNT >= 0x0501
...
TzSpecificLocalTimeToSystemTime
...
#endif // (_WIN32_WINNT >= 0x0501)
My question is: How is it possible that the compiler did not catch this? I guess an include-hell a la mfc + windows.h could yield this, but I really can't see where the error is. Have you seen anything like this?
|
|
PokerMemento - http://www.pokermemento.com/
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Maybe you use some 3rd party library that has WIN32_WINNT >= 0x0501. Anyway, find code in project that run it - MFC doesn't call it.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |