Debug a process in a VM - c++

I'm developing a program in C++ and I'm facing a problem. When I run it on my development (Win 10) machine, it works fine. As it also has to run on Windows XP, I installed Windows XP in VMWare and tried to run it, but it crashes. It's been compiled with the latest Visual Studio toolset for Windows XP, so this is not the problem. There's not much info about the crash on the machine.
How do I debug it remotely? I'll probably need to attach it to Visual Studio 2015s debugger, but if there's another solution, I won't be against it.

You can install Visual Studio Remote Debugger on a machine that has problems and connect to it from your Visual Studio. After that you will be able to debug a remote process from your PC.
The latest remote debugger support Windows 7 and newer, so you might end up installing older version from VS 2013 or 2010 that would support Windows XP.

Related

Why do I get "Illegal Instruction" error when Building on windows10 and running on Windows7

I have a c++ program built using VS2017 on windows7.
When I run it on Windows7 or windows10 there is no problem.
If I Build the same program on Windows10 (still using VS2017) the program runs OK on Windows10 but when I try to run it on Windows7 I get an "0xC000001D: Illegal Instruction." error.
Is it even possible to run programs built in Windows10 on Windows7 ? and if so what can I do?
Thanks
The default SDKs will be different on your two VS2017 installations. Right-click the project, select "properties", then the "General" page. See Windows SDK Version.
You can install different SDK versions (and different Platform Toolsets) using the Visual Studio installer ("Modify").
You would probably need to install the v140 toolset.
Also see the response here:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/e19634d8-f635-4ed0-b8d7-45b64ccbd6fa/windows-sdk-7-in-visual-studio-2017?forum=visualstudiogeneral
...which states:
You can create a project with the default project template. After that, right click the project name under Solution Explorer and go to Configuration Properties-General, modify the 'Platform Toolset' to Windows7.1SDK, since you already installed the Windows SDK 7. Please have a look at the following note:
##To change the target platform toolset, you must have the associated version of Visual Studio or the Windows Platform SDK installed. For example, to target the Itanium platform with the Windows7.1SDK platform toolset, you must have Microsoft Windows SDK for Windows 7 and .NET Framework 4 SP1 installed
If the above not works, you can also modify the platform toolset to Visual Studio 2010 (v100), which has the same compiler like Windows SDK 7, if you have the VS 2010 and VS 2017 on the same computer

Compiling code for Win32 applications - Windows XP and Windows Server 2003 R2

I'm on a Windows 10 computer trying to compile some C++ code with Visual Studio 2013, but I cannot get the code to run on a Windows 2003 R2 Server, and I'm unsure why.
I tried compiling with the XP flag, and I have OpenSSL and VCRedist x86 2005 - 2019 installed on the server.
My project is located at https://github.com/erfg12/EQClassic The world.exe and zone.exe work on Win2k3 server just fine, but it's the login.exe that says, "This is not a valid win32 application". To compile the code simply grab the Dependencies from https://drive.google.com/file/d/0B4YtK9YXaHvQbU93Z25kY2J4WWM/view?usp=sharing and place them into the Dependencies folder and press compile in Visual Studio.
If anyone could get Login.exe to work on a Windows 2003 server or a Windows XP desktop computer that's exactly what I need. Thank you.

running visual studio release build .exe file in different machines

I have built a visual studio c++ console application(x64 release build). The .exe file in the release folder runs fine with the required dlls.
When i try to run it on other machine it throws error
The Application was unable to start correctly (0xc000007b). Click OK to close the application
There is no x86-x64 lib mismatch issues.
In another machine it works well.I don't know whether it needs any resource to run the .exe
I have tried building the application statically still no results..
1)It is possible the new machine is missing important software like .NET framework or something similar. Please install the other frameworks and then try to run it on other machine.
2)If new machine has other OS try to run program in compatibility mode
You need the same Visual Studio redistributable .dlls on your target machine.
You'll either need to install the redistributable or install visual studio on that machine.
Also note that it makes a difference whether you're using Express or not.
So you can't develop on Visual Studio 2008 Express and then install the Visual Studio 2008 Redistributable.

CEF3 crashes on Windows XP

I hope that all is well.
I'm trying to develop an application on Visual C++ 2010 with Chromium Embedded Framework 3. The application runs perfectly on Windows 7. However when ran on Windows XP, it crashes. The first solution that I did was to check if there are missing DLLs.
When I check the debug file, it returns these errors:
[0520/140334:ERROR:gpu_info_collector_win.cc(103)] Can't retrieve a valid WinSAT assessment.
[0520/140336:ERROR:renderer_main.cc(227)] Running without renderer sandbox
Running the application in Visual Studio 2013 solved the issue. Perhaps the sandbox is built using this version.

C++ app built on Windows 7 (using VS2010 IDE and VS2008 toolset) runs on Windows 7, but not on Win XP

I have a C++ application, which is built on Windows 7 using VS 2010 IDE against VS2008 toolset. I have verified that it depends on msvc*90.dll.
The problem occurs when i move it to XP professional SP3 machine. I have installed the 32-bit vs 2008 redistributable package too.
However, the application fails to run. No error is reported. Nothing is logged into system even viewer as well.
Any hints?
PS: I have seen the following threads already.
Program Built on Win7 won't run on WinXP
How do I compile for windows XP under windows 7 / visual studio 2008
Have you checked the DLL in that Windows XP system with Dependency Walker. This may help you find if you are not missing another dependency or not dealing with side by side execution problems.
This issue is resolved now. The problem was not related to dependencies. Instead, it was some directory not existing in the file system.