xx is not a valid win32 application - windows

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.

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.

WinCE 7.0 development using Windows Embedded Compact 2013

I have to develop an Application for WinCE 7.0 device (MC3200 MOBILE COMPUTER).After googling for a while I came to know that WinCE development can be done only from VS 2005/2008 Pro(or greater).I also saw some answers here but they were too old to be considered.
When asked to the product vendor they said that I can use windows Embedded Compact 2013 and develop C# applications for WinCE 7.0 in VS 2012/2013 Pro(or greater).
From what I searched, Windows Embedded Compact 2013 is itself an OS then how can i develop for WinCE 7.0 OS using Windows Embedded Compact 2013 in VS 2013 Pro ? I am confused with this Windows naming of versions and their functionality totally.Can someone please shed some light over this topic.
The name Windows CE was used up to version 6. Since version 7 they named it Windows Embedded Compact, and its next version was 2013. You can't have both simultaneously of course, and the link with device information you provided also shows:
Operating system (OS)
Choice of Windows Embedded Compact 7.0 (Standard or Premium) or Android 4.1 (Premium)
(for the Windows CE history see also https://en.wikipedia.org/wiki/Windows_CE)
For Windows Embedded Compact 7 (.NET 3.5) you have to use Visual Studio 2008, and for Windows Embedded Compact 2013 (.NET 3.9) you can use Visual Studio 2012.

I can't install .net framework 4 on my desktop which has Windows XP service pack 2 O.S

I made a small simple c# application in Visual studio 2010 ultimate and i deployed it and it requires .Net framework 4 to run but when I tried to run this app in a desktop of Windows XP Service Pack 2 it is showing me an error that it requires "Windows Imaging Component" and it is providing me a link to download it - http://go.microsoft.com/fwlink/?linkid=162643&clcid=0x409
but when i download WIC from this site and tried to run on that desktop it is showing me an error that ??????????????????????Windows XP???????????? nw what should i do to run my app in that desktop plz suggest me some thing.
Why SP2 for XP? Are you running XP x64? If you aren't using x64 make sure you have windows installer 3.1 and it should install with no issues. As a side note however, .net 4.0 is NOT supported on XP SP2.
This link can help.
Windows XP SP 2 is very old and you may need to upgrade to SP3

How install Windows Phone SDK on Win Server 2008R2?

I use windows server 2008r2 for development. I want try work with Windows phone 7 SDK. But it available only for Windows7 and Vista.
Is there some trick for development on WinServer?
I did this with the v7.0 version of the tools by following the instructions at Buliding Windows Phone 7 projects on Windows Server 2008
I have tried with the Mango tools though (as don't need to build on Server anymore).
There is no provision to develop WP7 applications on Windows Server 2008 or R2.
There is a workaround to compile WP7 projects on Windows Server 2008, which supports TFS builds, but as far as development on the platform the installer prevents you from doing that. Frustrating, to say the least!

Windows Server 2003 platform SDK

I am using Windows Server 2003 x64 Enterprise with SP2 and I want to install platform SDK.
But all I find is from here, and it is called Windows® Server 2003 SP1 Platform SDK. I am confused about SP1. For my platform, should I use this version of platform SDK or some other later version (I think there should be SP2 platform SDK, but I did not find out.)
http://www.microsoft.com/downloads/details.aspx?familyid=a55b6b43-e24f-4ea3-a93e-40c0ec4f68e5&displaylang=en
thanks in advance,
George
Microsoft doesn't release an SDK for every service pack of every Windows version. Instead, they release service packs along with a system release whenever the system includes new functionality. So for developing on Windows 2003, the SP1 service pack will be fine. Other options include:
the SDK for Windows 2003 R2
the SDK for Windows Vista
the SDK for Windows 7
the SDK for Windows 2008
See the list of supported operating systems to verify that each of them supports Windows 2003.

Resources