Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

[interop] native DLL only accessible from my C# project.

$
0
0

Hello

In order to better protect the source code of some functions, I moved them from my C# project to a native C++ dll. The concerned functions are now declared as "extern "C" __declspec(dllexport)" and can thus be used by any external program.

Now, I would like to restrict the usage of these functions so that only my C# program can call them (or at least make these functions throw an exception if they are not called by my authenticated program). How can such verification be made in a very safe way? Is it possible to check inside the C++ functions the strong name of the calling assembly?

Thank you in advances for any advices regarding this matter.

max


Viewing all articles
Browse latest Browse all 1710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>