VS2012 C++ DLL compatability - c++

I have a DLL compiled in vs10 on windows xp 32bit
Then i moved to windows 7 32bit and compiled it in vs2012, the project build target was win32.
The new compiled DLL works perfectly when i use it on windows 7, but when i run it on win xp sp3 it says the program cant find the dll error
0x8007007E
How is that possible and what settings do I have to change?

A simple workaround is to static-link the runtime modules using /MT
http://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx

Related

What DLLs to add to my Visual Studio 2017 project?

I have a C++ project compiled on Windows 8.1 that doesn't work on some computers. On another Windows 8.1 machine it doesn't open because it's missing a DLL file api-ms-win-core-*. On Windows 7 machines it crashes with a BEX error.
I link dynamically against the runtime library (Multi-threaded DLL (/MD)) and include the following DLLs in the same folder as my executable:
msvcp140.dll
ucrtbase140.dll
vcruntime140.dll
Is there anything else I should include?

The procedure entry point could not be located in dynamic link library

I have the following error when open my application.
I'm use windows 7 32bit platform, and Qt v5.3.1 with MinGW 4.8.2 - 32bit compiler .
All dll's files with Qt5Core.dll for 5.3.1 version already exists .
I don't know how to solve this problem.
Probably you get this error because you use dlls from QtCreator directory which was not compiled with mingw (often QtCreator compiled with Microsoft visual studio on Windows)
You should use dlls from C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin (for example) .
App which was compiled with mingw needs dll which compiled with mingw too.

How to detect if a library is using the XP compatibility (v120_xp)?

I have a big native C++ project which is build by many specific and 3rd party libraries in Visual Studio 2013.
I am compiling for both 64 bits and 32 bits architecture.
For the 32 bits architecture I set (for both the 3rd party and our libraries) the XP toolset (v120_xp) to keep the compatibility with Windows XP.
Recently we have updated a library and from the error we receive it looks like some of the library has not been set properly for XP. Is it possible with Dependancy Walker or other tools to detect which is the toolset used to build the DLL or the EXE?
I just need any way to check which library is not XP compatible.
Use dumpbin /headers my_program.exe and look for the operating system version and subsystem version. When building for Windows XP they will be 5.01. When not building for Windows XP they will be 6.00.
(This isn't foolproof--if the DLL or EXE declares that it runs on Windows XP but tries to use Windows APIs that are not available on Windows XP, then obviously the DLL or EXE won't run on Windows XP.)

C++ Windows Shell Extensions - Win7 32bit - 64bit compatibility issues

i have visual studio 2005 and i am writing a shell extension for windows explorer.
It works in Windows Vista 32bit where i compile the project.
It also works on Windows 7 64bit when the project has been compiled on Windows7 64bit.
Now i want to test it also on Windows 7 32bit when the project has been compiled on Windows Vista 32bit but it does not work !
Are there compatibility issues between c++ versions ?
The shell extension dll won't register. (side by side error).
Is it necessary to compile it on Windows 7 32bit to make it work ?
My dll is based on the example of "complete idiot's guide to writing shell extensions" on codeproject.com
Thanks !
it should not be compiled in debug mode but only in release mode.
also in a frequent example on the internet there is a bug and the int should get
converted to IntPtr...

How to make 64 bit dll compatible with 64-bit editions of Windows Server 2008, Windows 7, and Windows XP?

I have compiled a dll on Windows Server 2008 64 bit edition. It works fine on that version of Windows, but if I switch to Windows 7 or XP 64 bit edition the dll does not work. How can I make the dll compatible with all three versions of 64bit edition windows?
I am using Visual Studio 2010.
You can use a program called Dependency Walker to see what dependencies your .dll file has, and eliminate the ones that are different between versions of Windows.
Check how _WIN32_WINNT and WINVER macros were defined in your DLL. To make your DLL compatible with Windows XP you should define them as 0x0501. That lets you find all dependency problems at compile time. More information about these macros you could find here.