I have a WinForms application which has a C++ library called DeviceAccess. The C# libraries are targeting the .NET Framework 4.5.1 (x86), and my C++ library is targeting Windows SDK Version 8.1 and Platform Toolset Visual Studio 2017 (v141) and Win32. I am building the application on my Windows 10 machine and trying to run through virtual machines of Windows 8.1 and Windows 7.
I've already set those two defines inside targetver.h, which looks like:
#pragma once
#define WINVER 0x0601
#define _WIN32_WINNT 0x0601
#include <SDKDDKVer.h>
But, still when I open the application through my virtual machine of Windows 8.1 or Windows 7, I get the following error:
Could not load file or assembly '...DeviceAccess.dll' or one of its dependencies. The specified module could no be found.
I have the .dll at the same folder as the application.
Someone have any idea why I cannot load the C++ library, please?
EDIT: I run the Process Monitor and filtered the missing DLL, as shown below:
I feel like the missing VCRUNTIME140.dll might be the issue?
EDIT2:
From Dependecy Walker I got those error when loading that DLL: