#include "ntverp.h"
#if !defined(VER_PRODUCTBUILD) || VER_PRODUCTBUILD < 3790
#pragma message ("********************************************"
#pragma message ("Error: You need the latest Microsoft Platform SDK to compile this project.")
#pragma message ("********************************************"
#endifThere are other constants defined in the header which may be of use to you. I believe my preprocessor directives above simply check that VER_PRODUCTBUILD is at minimum Platform SDK for Microsoft Windows Server 2003. There is another constant VER_PRODUCTBUILD_QFE which I *think* can determine patches and service packs.
Best Wishes,
-David Delaune
http://www.codeproject.com/Messages/2997680/Detecting-Windows-SDK-version-using-macros.aspx
看到這個,以後...也許會有用
沒有留言:
張貼留言