currently I develop a C#.Net application in which I'm using a custom control I developed some time ago. I need the dll to be shipped within the new application - but understandably I do not want the dll file to be used for foreign apps.
That's why I need the custom dll to be somehow compiled within the new application. Currently the dll is copied into the application directory.
Any ideas? Should be trivial imho.
Thanks & regards, Daniel
It's possible. You could install the DLL in the GAC (requires strong named assemblies) in order for both applications to have easy access to it. Or stick it in a folder and have both apps search that folder for the dll.
Type "regsvr32 /u DLL NAME" into the command prompt, substituting the actual DLL name without the brackets for "DLL NAME." Press enter. The DLL file is now no longer running on your system.
Keep the DLL in a resource and expose it in the file system (under a suitably obscure name, perhaps even generated at run time) only when running. Hide all real functions behind a factory method that exchanges a secret (better, proof of knowledge of a secret) for a table of function pointers to the real methods.
Process Explorer has a facility that allows you to search through the currently running processes for a specific file. To perform this search go to Find -> Find Handle or DLL... and then enter the name of the file you are interested in.
I think you need to be looking into licensing your control(s): http://msdn.microsoft.com/en-us/library/fe8b1eh9.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With