Hello, thanks for replying.
I’m not sure the crash is related to the preprocessor definitions. I’m not sure where it’s coming from.
In C# I get a DllNotFoundException. I make the same process that I did in the step 2 that worked fine.

I call it with the following code:
public const string CppFunctionsDLL = @"DycareAPIBLE\Dependencies\Dll1.dll";
[DllImport(CppFunctionsDLL, CallingConvention = CallingConvention.Cdecl)]
extern static int sum(int a, int b);

var a = sum(2, 7);
I’ve also used a dependency walker. This one: Dependencies and nothing weird shows up.
From your experience, if the code in step 2 works and I add NOMINMAX to preprocessor and add the includes to the code. This should work fine?