Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > General Discussion
  New Posts New Posts RSS Feed - WINVER relevance?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

WINVER relevance?

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: WINVER relevance?
    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/
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 08 July 2009 at 3:59am
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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.