Yes. It is odd. The windows.h is included indirectly. The same sources compiled fine with Visual Studio 2005.
And no. I do not have PlatformSDK subdirectory at C:\Program Files\Microsoft Visual Studio 9.0\VC\. And yes, I have such subdirectory in C:\Program Files\Microsoft Visual Studio 8\VC\.
I do not know how it happened that it is not there...
Main Topics
Browse All Topics





by: GurudenisPosted on 2009-01-09 at 04:20:32ID: 23334769
Can you find windows.h in "<VS_FOLDER>\VC\PlatformSDK\ Include"? If it's there, add this folder to Include directories in the VS settings. Otherwise either download and install the Platform SDK or reinstall VS.
Also make sure you have this in your stdafx.h:
#define _WIN32_WINNT 0x0501
#define _WIN32_WINDOWS 0x0500
(or some other values to target any system higher than Windows 98 and NT 3.0).
Last but not least, make sure that your code actually includes windows.h. If the file were missing, the #include directive would be the one giving errors rather than the reference to WINDOWINFO, so your the message you got strikes me as odd.