Calling dll linking other dll, makes unity crash on Vista

Hello all,

I am calling a c++ dll from unity. This dll uses a second dll.
I have to copy the linked dll into the same dir as the unity editor exe, else I get a DllNotFound.
This works, but as soon as I call a function in my main dll that uses the second dll, it crashes.
It works on MacOS, but crashes on Vista, XP is not tested.
I use a tool called DebugDiag to see what is going on.

I get an access violation exception:

“testingdll.dll has caused an access violation exception (0xC0000005) when trying to write to memory location 0x00000050 on thread 0”

This makes me think that it has to do with DEP (Data Execution Prevention) in vista, but I have disabled it.

I also tested the windows exe with a program called Auto Debug, and it tells me the same exception.

I have tried with another dll that doesn’t link a second dll, and it seemed to work.

It seems that unity has a problem with 2 dlls linking each other?

Anyone know how I could get my dll’s to work on Windows Vista? without recompiling, since these work on MacOs.

Answers greatly appreciated :slight_smile:

The error is a windows error not a unity based error nor even a .net error

the problem is caused by the dll actually.

and you will have to recompile if it is a DLl and not a .NET assembly, which it obviously isn’t if DLLNotFound exception happens.
DyLibs are not supported on anything but osx