dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11

Thread: Determing the version of Windows SDK

  1. #1
    Join Date
    Jan 2006
    Posts
    384

    Determing the version of Windows SDK

    Hi,

    How would one determine the version of Windows SDK being used in the development of a product ? Is the Windows SDK version the same as the version of Visual Studio being installed for the development or is there any other way of finding out the version ?

    I was wondering if there is anything available in the VC++ project/solution file which would indicate the version & location of Windows SDK being used.

  2. #2
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: Determing the version of Windows SDK

    No, it's not the same as the version of Visual Studio. They have nothing to do with each other. You could use Windows SDK with other tools too.

    You can find the installed versions by going to c:\Program Files\Microsoft SDKs\Windows\. The folder names contain version numbers, i.e. v5.0, v6.0A, v7.0A, etc.

    In your project you can specify which version you want to target.
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  3. #3
    Join Date
    Jan 2006
    Posts
    384

    Re: Determing the version of Windows SDK

    Hi,

    I could locate the Windows SDK installation at the locations you mentioned in a Windows Vista machine, but I dont see anything similar in a Windows XP machine.

    I created a dummy pure VC++ console based application and analyzed the project settings, but could not locate any reference to Windows SDK versions being used. Could you kindly mention where exactly the version could be indicated ?

    Is there a chance that Visual Studio reads up some setting in the registry to detect the version and location of Windows SDK being used ?

    This is a VS2005 based pure C++ project built on a Windows XP machine.
    Last edited by humble_learner; September 29th, 2010 at 06:11 AM.

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,562

    Re: Determing the version of Windows SDK

    Quote Originally Posted by humble_learner View Post
    Hi,

    I could locate the Windows SDK installation at the locations you mentioned in a Windows Vista machine, but I dont see anything similar in a Windows XP machine.
    Strange! My XP (+ SP3)machine does contain C:\Program Files\Microsoft SDKs\Windows folder with subfolders:
    v5.0
    v6.0A
    v7.0A

    Victor Nijegorodov

  5. #5
    Join Date
    Aug 1999
    Location
    <Classified>
    Posts
    6,882

    Re: Determing the version of Windows SDK

    Quote Originally Posted by humble_learner View Post
    Hi,

    I could locate the Windows SDK installation at the locations you mentioned in a Windows Vista machine, but I dont see anything similar in a Windows XP machine.

    I created a dummy pure VC++ console based application and analyzed the project settings, but could not locate any reference to Windows SDK versions being used. Could you kindly mention where exactly the version could be indicated ?

    Is there a chance that Visual Studio reads up some setting in the registry to detect the version and location of Windows SDK being used ?

    This is a VS2005 based pure C++ project built on a Windows XP machine.
    Visual Studio refers to the latest SDK that you have installed by looking at the environmental variables such as Include and Lib.
    Regards,
    Ramkrishna Pawar

  6. #6
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,562

    Re: Determing the version of Windows SDK

    Quote Originally Posted by humble_learner View Post
    Is there a chance that Visual Studio reads up some setting in the registry to detect the version and location of Windows SDK being used ?
    Who knows?!
    But yes, there is chance that Visual Studio reads up some setting in the registry to detect the version and location of Windows SDK. Just because there are some keys in registry like:
    • HKEY_CURRENT_USER\Software\Microsoft\Microsoft SDKs
    • HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\External Tools
    • HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\External Tools
    • HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Assoc_SvcTraceViewer_Proj_x86_enu
    • ....
    with subkeys and values containing C:\Program Files\Microsoft SDKs\Windows folder ...
    Victor Nijegorodov

  7. #7
    Join Date
    Aug 1999
    Location
    <Classified>
    Posts
    6,882

    Re: Determing the version of Windows SDK

    I don't think it's the registry, look at tools->directory settings, there it fixates onto those SDK versions based on the configuration.
    Regards,
    Ramkrishna Pawar

  8. #8
    Join Date
    Jan 2006
    Posts
    384

    Re: Determing the version of Windows SDK

    Quote Originally Posted by VictorN View Post
    Strange! My XP (+ SP3)machine does contain C:\Program Files\Microsoft SDKs\Windows folder with subfolders:
    v5.0
    v6.0A
    v7.0A

    I have a Windows XP SP3 machine too, and looks like the Windows SDK is available at
    C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\

    As per Krishnaa's adivise, I looked at the [Tools->Options->VC++ Directories (LibraryFiles)], the path is specified as $(VCInstallDir)PlatformSDK\lib.

    There seems no indication to suggest the "version" of the Windows SDK that is being used over here.

  9. #9
    Join Date
    Aug 1999
    Location
    <Classified>
    Posts
    6,882

    Re: Determing the version of Windows SDK

    So, then you do not have Windows SDK, you have the default SDK that comes with Visual Studio, whose version is not important.
    Regards,
    Ramkrishna Pawar

  10. #10
    Join Date
    Jan 2006
    Posts
    384

    Re: Determing the version of Windows SDK

    There's another folder ---> C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0, which I assume are the SDK specific to developing .NET based applications (not many header files and lib files are available here)

    Just curious, but would the default Platform SDK fall anywhere in the version list provided at the following link : http://en.wikipedia.org/wiki/Microsoft_Windows_SDK ?

    When you have the set up as is available in my machine, in what circumstances would you go about explicitly installing Windows SDK on top of what is available ?

  11. #11
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Determing the version of Windows SDK

    Quote Originally Posted by humble_learner View Post
    In what circumstances would you go about explicitly installing Windows SDK on top of what is available ?
    When you discover that the constant, function, macro, lib file, dll, etc. doesn't exist in your current version of the SDK, and only exists in the later version.

    Regards,

    Paul McKenzie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)