Crash when using SoftwarePassport / Armadillo protected native DLLs

I’m unable to get Unity to work at all with native DLLs protected with SoftwarePassport / Armadillo.

If I run a project from within Unity (I’m using Unity 4.2.0.f4) that attempts to load a protected native DLL from a C# script then Unity crashes. If I build and run a standalone executable it crashes as well.

I’m unsure exactly what goes wrong and how to proceed in finding the error, so any help or hints would be greatly appreciated.

I’ve tested this using my own project built from scratch, as well as the “Simplest Plugin Project” from the PluginsForDesktop manual, and neither work.

A few things I’ve tried without success:

  • Have my C# script load an unprotected C DLL which in turn calls LoadLibrary on a protected DLL.
  • Use LoadLibrary/GetProcAddress instead of DllImport in my C# script.
  • Change to the most compatible protection level in Armadillo, as well as experimenting with various settings.

In case someone would be willing to take a look at the crash I’ve attached a protected version of ASimplePlugin.dll from the Simplest Plugin Project. Simply replace ASimplePlugin.dll in Assets\Plugins with the attached file and you should experience the crash as well.

Do you know if others have successfully used Armadillo protected native DLLs with Unity?

1347528–66093–$ASimplePlugin.zip (888 KB)

Can I shamelessly bump this?

Because this is relevant to our interests as well.

Anyone managed to succesfully do this?