windows 哪里可以下载windows xp平台SDK?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5728142/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 08:19:27  来源:igfitidea点击:

Where to download windows xp platform SDK?

windowsvisual-studiowinapiwindows-xpplatform-sdk

提问by mans

I want to compile a code that I have from long time ago using VS express 2005. The code needs windows.h which is not part of VS 2005 and I found that I need to install platform SDK. But I cannot find platform SDK for windows XP. Where can I download this platform SDK? Where can I find windows.h?

我想用VS express 2005编译很久以前的代码。代码需要windows.h,它不是VS 2005的一部分,我发现我需要安装平台SDK。但是我找不到适用于 Windows XP 的平台 SDK。哪里可以下载这个平台SDK?我在哪里可以找到 windows.h?

采纳答案by Lars

have a look http://en.wikipedia.org/wiki/Microsoft_Windows_SDK

看看http://en.wikipedia.org/wiki/Microsoft_Windows_SDK

or download directly as iso from cnet

或直接从cnet下载为 iso

回答by Cody Gray

You don't need to find the SDK for Windows XP. Each release of the Windows SDK targets the latest version of Windows, as well as several previous versions. You should always install the latest version of the SDK unless you are targeting an extremelyold version of the OS. At this point, Windows XP doesn't quite count (yet).

您无需查找适用于 Windows XP 的 SDK。Windows SDK 的每个版本都针对最新版本的 Windows 以及几个以前的版本。您应该始终安装最新版本的 SDK,除非您的目标是非常旧的操作系统版本。在这一点上,Windows XP 还不算数(还)。

All you need to do is make sure that you set the appropriate target version when compiling your project. To target Windows XP, you should simply define WINVERto version 0x0501, like so:

您需要做的就是确保在编译项目时设置适当的目标版本。要针对 Windows XP,您应该简单地定义WINVER为版本 0x0501,如下所示:

#define WINVER 0x0501

You can find more information about targeting specific versions of Windows using the headers here.

您可以在此处找到有关使用标头定位特定 Windows 版本的更多信息。

And you can download the latest SDK here: http://msdn.microsoft.com/en-us/windows/bb980924

您可以在此处下载最新的 SDK:http: //msdn.microsoft.com/en-us/windows/bb980924

回答by Igor Skochinsky

Just in case someone actually needs an old SDK, here's one from Feb 2003:

以防万一有人真的需要旧的 SDK,这里是 2003 年 2 月的一个:

http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.1.cab
http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.2.cab 
http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.3.cab    
http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.4.cab    
http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.5.cab    
http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.6.cab    
http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.7.cab    
http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.8.cab    
http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.9.cab    
http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.10.cab    
http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.11.cab    
http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.12.cab    
http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.13.cab    
http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.bat    
http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/extract.exe

回答by Chris Becke

Visual Studio Express - all versions including 2005 - install the necessary platform SDK files to build windows targets.

Visual Studio Express - 包括 2005 在内的所有版本 - 安装必要的平台 SDK 文件来构建 Windows 目标。

You have somehow damaged the install if projects made by the project wizard (that #include <windows.h>) do not work.

如果项目向导制作的项目(那个#include <windows.h>)不起作用,那么您就以某种方式损坏了安装。

回答by daniel

If you are using c++ you can always target windows xp - windows 10 using the following lines of code.

如果您使用的是 c++,您始终可以使用以下代码行来定位 windows xp - windows 10。

/**
 * Copyright (c) 2014 - 2016, Dark Edge Studios, All Rights Reserved.
 *
 * Authors
 * - Daniel I. Dorn <[email protected]>
 *
 * The following code example is under the terms of the ZLIB / LIB PNG
 * License please only use as license permits.
 */

 #ifndef YourIncludeGaurds
 #define YourIncludeGaurds

 /* Check if Windows */
 #if defined(_WIN32) || _WIN64

     /* sdkddk Header File */
     #include <sdkddkver.h>

     /**
      * Windows XP
      */
     #if defined(_WIN32_WINNT) && NTDDI_VERSION == 0x05010000

     #endif /* Windows XP */

     /**
      * Windows Vista
      */
     #if defined(_WIN32_WINNT) && NTDDI_VERSION == 0x06000000

     #endif /* Windows Vista */

     /**
      * Windows 7
      */
     #if defined(_WIN32_WINNT) && NTDDI_VERSION == 0x06010000

     #endif /* Windows 7 */

     /**
      * Windows 8
      */
     #if defined(_WIN32_WINNT) && NTDDI_VERSION == 0x06020000

     #endif /* Windows 8 */

     /**
      * Windows 8.1
      */
     #if defined(_WIN32_WINNT) && NTDDI_VERSION == 0x06030000

     #endif /* Windows 8.1 */

     /**
      * Windows 10
      */
     #if defined(_WIN32_WINNT) && NTDDI_VERSION == 0x0A000000

     #endif /* Windows 10 */

 #endif /* Windows */

 #endif /* YourIncludeGaurds */

hope this helps explain some things (=

希望这有助于解释一些事情(=