VC6 and odd WINVER message during compile - visual-c++-6

I get the following message in a VC6 project compile:
OTE: WINVER has been defined as 0x0500 or greater which enables
Windows NT 5.0 and Windows 98 features. When these headers were released,
Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions.
For this release when WINVER is defined as 0x0500 or greater, you can only
build beta or test applications. To build a retail application,
set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk
to see if retail Windows NT 5.0 or Windows 98 headers are available.
See the SDK release notes for more information.
Any idea what is going on?
It builds and links fine.
I have VC6, VS2005 and 2008 on my XP machine.
Perhaps my Platform SDK is not up to date?

The warning message you're seeing is from the Platform SDK that was supplied with the Visual C++ 6.0 installation, which it seems dates from when Windows 2000 was in beta.
If your application requires WINVER to be 0x0500, and you still need to use Visual C++ 6.0, I would recommend that you install a more recent Platform SDK. According to this blog post, the most recent Platform SDK that is compatible with Visual C++ 6.0 is the February 2003 edition. (There's another post here that may be useful.)
A word of caution, though - I don't know whether the February 2003 Platform SDK will coexist with your Visual Studio 2005 and 2008 installations.

Or VC6's include path doesn't include your SDK and it's only using the ones that came with VC6.

Did you installed the latest VC6 Service pack?

Related

How do I change target platform in visual studio 2017 c++?

I have a project that installs and runs on windows 10 machines but on windows 7 when I try to run it a notification pops up that says there are missing .dll files. I believe visual studio needs to be targeting windows 7 for it to run on windows 7. When I go to the property pages in visual studio, the "Target Platform" field says "Windows 10" and can't be changed. How do I change the target platform?
The "Target Platform Version" field in the Visual C++ project properties only picks which Windows SDK to build against. For Win32 desktop apps, if you want to build against a 'down-level' version of Windows like Windows 7, you need to set the _WIN32_WINNT preprocessor symbol to the appropriate value.
#include <WinSDKVer.h>
#define _WIN32_WINNT 0x0601
#include <SDKDDKVer.h>
See Using the Windows Headers for details.
The Windows 8.1 SDK, the Windows 10 SDK (10240), Windows 10 SDK (10586), Windows 10 SDK (14393), and Windows 10 SDK (15063) can be used to build Windows Win32 desktop apps for Windows Vista SP2, Windows 7 SP1, Windows 8.1, and Windows 10.
Keep in mind that the VS 2015 / VS 2017 C/C++ Runtime supports Windows 7 Service Pack 1, but does not support Windows 7 RTM. Windows 8.0 is not officially support either as users are expected to have upgraded to Windows 8.1 or Windows 10 by this point.
Note that building for Windows XP Service Pack 3 with VS 2017 requires explicit use of the v141_xp Platform Toolset because it requires a Windows 7.1A SDK--the last SDK to support targeting Windows XP. See this blog post for various implications of using this.
The include file explains it:
1. Including SDKDDKVer.h defines the highest available Windows platform.
2. If you wish to build your application for a previous Windows platform, include WinSDKVer.h and set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
So you need to target the minimal Windows version you wish to support and it will then support any version above (and including) it. That has nothing to do with the Windows 10 SDK which supports all previous Windows versions.

How do I compile a driver for Windows Vista in Visual Studio 2015

I want my driver to be supported by Windows Vista. I am using Visual Studio 2015 for development. I have downloaded and installed WDK 10 which supports my driver down to Windows 7. According to this site I need WDK 8 for my driver to be compatible with Windows Vista. After I installed the WDK 8 i cannot set it in Visual Studio.
What is the proper way to integrate WDK 8 into Visual Studio 2015?
WDK 8 can be used till Visual Studio 2012, after that it is not officially supported. Check link
https://developer.microsoft.com/en-us/windows/hardware/windows-driver-kit
It clearly says that:
We provide Windows Driver Kit (WDK) 8 to give you time to migrate to WDK 8.1 Update and Visual Studio 2013. Microsoft does not support WDK 8 and will make no further updates to this kit. We recommend that you use the latest versions of the WDK and Visual Studio to build drivers for Windows.
Important: You must install Visual Studio Professional 2012 or Visual Studio Ultimate before you install WDK 8.
So for using WDK 8 and driver for Vista you need Visual Studio 2012.
You can use WDK 7 to produce drivers compatible with Vista. If you wish to "integrate" it to Visual Studio, look at VisualDDK (http://visualddk.sysprogs.org/), however, it probably does not officially support Visual Studio 2015.
Another way of making drivers compatible with Vista is to compile your driver with the current WDK (WDK 10) and have a closer look why it does not work under Vista. The incompatibility is usually caused by missing imports which can be partially solved by disabling various checks in your driver project (e.g. security check). By this approach, you can even be compatible with XP (at least, it worked for me with WDK 8.1).
You would need to get Windows Driver Kit 7 or 8. Looks like the WDK support for Vista was dropped in 8.1. If you want to build drivers for Windows 7 and up then WDK 10 should work.
Here's the link to WDK 7.1.0:
https://www.microsoft.com/en-us/download/details.aspx?id=11800

xx is not a valid win32 application

I developed a Win32 program using VC++ 2012 (Express 2012 for Windows Desktop). I chose "Win32" / "Win32 Console Application" while setting up my project. I can run it at Win-7, but failed at POSReady 2009, which is close to WinXP. While I ran it under POSReady 2009, it shows as title.
Is there any way to configure project property on VC++2012 or any other ways to conquer it? Thanks.
You need to install VS 2012 Update 1 or later or VS 2013 Express, and set your Platform Toolset to "v110_xp" or "v120_xp" to make an application that is compatible with Windows XP Service Pack 3 / Windows Server 2003 Service Pack 2).
The key difference between the "v110"/"v120" and "v110_xp"/"v120_xp" Platform Toolset is the Windows SDK. "v110"/"v120" builds with the Windows 8.x SDK which supports targeting Windows Vista or later. It is not possible to build a Windows XP compatible application using the Windows 8.x SDK. Therefore, to target Windows XP / Windows Server 2003 you have to use the alternative Platform Toolset which uses the Windows SDK 7.1A which is included with Express for Windows Desktop.
With either Windows SDK, be sure to set _WIN32_WINNT appropriately for the OSes you are targeting. See Using the Windows Headers. For Windows XP / Windows Server 2003 set it to _WIN32_WINNT=0x0501
Note that for DirectX development, this has some important impacts because the Windows 7.1 SDK was before the DirectX SDK integration that was done for the Windows 8.x SDK. See this blog post for more details.

Visual Studio 2010 Express, Windows SDK 7.1, CMake and 64 bit

I'm running into problems generating a Visual Studio 2010 Express 64 bit project through CMake. I installed VS2010 Express first, then the Windows SDK 7.1 in order to be able to build 64 bit apps and then tried to compile my CMake project.
I do not remember this to be that difficult with 2008 Express, but with 2010 I fail again and again. 2010 searches per default for 7.0a SDK which is shipped with it. The express version seems to ship a reduced 32 bit version, which is located under
.../Program Files(X86)/Microsoft SDKs/Windows/7.0a
Windows SDK 7.1 64bit will be installed per default under
.../Program Files/Microsoft SDKs/Windows/7.0
In VS 2010 Express the platform SDK can be changed on a per-project-map basis and if I do so the inherited path macros surprisingly point to the correct SDK. The problem now is, that CMake is not happy about me screwing around in the project files by myself. Thus, it always resets the Platform SDK entry to the default value, which will make the Windows SDK point to 7.0a and result in complaints about missing 64 bit libs.
I now see two possibilities to resolve this:
Find a way to really integrate the 7.1 SDK into VS2010 Express, just like with VS2008. VS2008 searches the registry for the tag 'CurrentInstallFolder' in the Windows SDKs entry, and you can change this entry to point to another SDK.
Find a way to tell CMake (2.8.1) to set the correct Platform SDK in the project. No plan how to do this...
I would appreciate any help. 2010 is somewhat mandatory unfortunately, I personally cannot get used to it at all...
Ok, updating to the latest CMake (2.8.12) resolved this, CMake now detects the 7.1 SDK and sets it in the project files.
Edit: The toolset can be chosen in a CMake file via the CMAKE_GENERATOR_TOOLSET flag

Using the Windows 7 and DirectX SDKs with VS2005

I have Visual Studio 2005 and want to teach myself DirectX in my free time. I downloaded the latest Windows 7 and DirectX SDKs. According to Microsoft's website, the latest DirectX SDK is not compatible with Visual Studio 2005 (I assume they mean it's not compatible with the SDK it came with). Can I configure VS2005 to use the SDKs I downloaded instead of the SDK it came with? If so, is there anything I should be particularly careful with?
The June 2010 DirectX SDK no longer supports Visual Studio 2005. You need to download an older version of the SDK and you'll be fine.
I'd wager you can encourage June 2010 to run under 2005. You may need to modify your headers slightly to make them 2005 compatible but the DX DLLs don't care what they get dynamically linked to by ... Install the SDK set up the include and library paths to point at the DirectX sdk ... compile and see what errors you get.

Resources