This topic is now archived and is closed to further replies.


_WIN32_WINNT question...

Recommended Posts

IvanGG    122
I want to use functions and constants defined only for WinNT, Win2000 and WinXP but I get compile errors. I found these identifiers in the windows header files enclosed in #if (_WIN32_WINNT > 0x0400) win2000 specific constants #else ... I can''t find where _WIN32_WINNT is defined. I tried to define it as 0x0500 since I am on WinXP but nothing changed. I tried also to get Platform SDK for WinXP but realized that there is no such a product. I have Visual Studio 6.0 installed. I know it''s something stupid here but please help me. Best wishes, Ivan.

Share this post

Link to post
Share on other sites
S1CA    1418
1) There is only "The Platform SDK", that contains the headers, libs etc for _ALL_ Windows platforms. The latest platform SDK includes the stuff for the new Windows2000 and XP functions (and final 98, 98SE and ME stuff).

2) The version of the platform SDK which comes with Visual Studio 6.0 is an old one from when Windows98 was still in beta. Windows2000 and XP hadn''t even been planned back then.

3) There are some Windows98 specific functions in the version of the platform SDK which comes with MSVC6. If you do "#define WINVER 0x500" *BEFORE* including windows.h, that''ll enable the functions.

4) For Win2k & XP functions you *MUST* download the new Platform SDK or order the CD.

Simon O''Connor
Creative Asylum Ltd

Share this post

Link to post
Share on other sites
iwasbiggs    122
To use the special specific functions of win2k/xp, you should define that before including windows.h or anything else that might also include windows.h

You were right to define it yourself, it is written on the msdn website.

BTW, there is a platform sdk, as the above poster said. Once you download all 200 or so megs (can''t really remember anymore)make sure you have your includes and libraries for the platform sdk set up to be included before the default ones.

Freeware development:

Share this post

Link to post
Share on other sites