Using VMProtect in C# DllExport

I’m currently using GitHub - 3F/DllExport: .NET DllExport with .NET Core support (aka 3F/DllExport aka DllExport.bat) · GitHub to compile C# into a DLL and export functions for use by other applications.

When I try to protect the compiled DLL with VMProtect, other programs cannot use this VMProtect protected DLL normally (eg. C# System.AccessViolationException)

I don’t know how to fix this, I need help
Release.7z (244 KB)
CsharpDLL.7z (2.87 MB)

You have to switch off the packing feature.

it looks like the source code can be viewed directly by dnSpy as long as I turn off the Packing feature.

It seems you don’t know how to use our software properly. The packing feature doesn’t protect anything!

Oh, shit. I manually added the VMProtect.BeginUltra flag to the function to be protected and it worked, although dnSpy can still view the source code directly, but it’s very hard to read (I can’t read it)

It seems my previous usage has been wrong, I didn’t use VMProtect SDK to mark functions before, I simply used VMProtect to package the output file

Sorry for the delay, our problem has been solved

We recommend to use [Obfuscation(Feature = “ultra”, Exclude = false)] instead of VMProtect.BeginUltra.

Thanks for the tip !

However, we have chosen to use VMProtect.BeginUltra

Our obfuscator removes the System.Reflection.Obfuscation flag

Don’t use other obfusactor/protector before VMProtect.