Where to download windows xp platform SDK?
Asked Answered
S

5

13

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?

Selffertilization answered 20/4, 2011 at 9:24 Comment(0)
P
9

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

or download directly as iso from cnet

Philender answered 20/4, 2011 at 9:30 Comment(1)
+1 for finding the right version, but I still might use the latest (it supports VS2005)Antihistamine
K
13

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 extremely old version of the OS. At this point, Windows XP doesn't quite count (yet).

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 WINVER to version 0x0501, like so:

#define WINVER 0x0501

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

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

Keg answered 20/4, 2011 at 11:20 Comment(1)
Latest SDK doesn't compile in VS6.Unblown
P
9

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

or download directly as iso from cnet

Philender answered 20/4, 2011 at 9:30 Comment(1)
+1 for finding the right version, but I still might use the latest (it supports VS2005)Antihistamine
B
5

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

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
Boyt answered 22/10, 2016 at 19:7 Comment(0)
O
-1

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

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

Overbite answered 20/4, 2011 at 11:50 Comment(1)
I'm pretty sure the 2005 Express edition doesn't include the Platform SDK; I specifically remember having to hunt it down and install it separately way back when (e.g. msdn.microsoft.com/en-us/library/ms235626%28v=vs.80%29.aspx). Seems like they integrated the Platform SDK in the 2008 Express editions, though.Cierracig
S
-1

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

/**
 * 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 (=

Sprig answered 14/2, 2016 at 5:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.