Click here to Skip to main content
14,455,062 members
Rate this:
Please Sign up or sign in to vote.
See more:
I need to protect my unmanaged (C++) DLLs from unauthorized usage, let me show what I have so far

1- C# application - this is the main application, where the GUI takes place and everything else
2- Injector C++ DLL - this dll is used to start a game and inject the third DLL into the game
3- Assistant C++ DLL - this is the dll that is injected to the game and communicate with the C# application

Everything is working as desired, the C# application successfully ask the Injector dll to inject the Assistant dll and the C# has full access to all Assistant dll exported functions even though they run at separated processes

I don't care about people peeking inside my C# assembly with reflector or anything else, but I need some way to protect those DLLs from being used with a recompiled version of the C# app or any other application
I need some way to check if the C# app is the original I've provided, I mean, once both Injector and Assistant dlls are loaded (maybe DllMain?) they MUST check if the C# app is the right one, if not then they will refuse to work

At first I used the WinVerifyTrust API to check if the C# is signed and certified, it worked but then I realized that I can not provide a valid certificate to sign the C# application and not even to compare the certificates on the C# app and the current DLL

So, if anyone know how to emit a valid certificate (for free, if possible of course) or how to check/compare strong name signatures - I can create those SNK or PFX files - or any other method to ensure that the C# application and/or the DLLs were not modified I'd be pleased if you share with me

Updated 24-Jul-14 14:28pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100