Print Page | Close Window

WINVER relevance?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Visual C++ MFC Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=14697
Printed Date: 20 September 2024 at 7:01pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: WINVER relevance?
Posted By: znakeeye
Subject: WINVER relevance?
Date 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/



Replies:
Posted By: Oleg
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net