Question Does it possible to restrict a DLL file to be only used by a single application?

pisceswzh

Well-known member
Joined
Mar 19, 2007
Messages
96
Programming Experience
1-3
In my application, there are lots of DLL compiled by VS. However I don't want these DLL be used by other applications.

Does it possible to add a signature to the DLL file and my application, so these DLL files can ONLY be used in my application?

Otherwise, there might be secrutiy breach or maybe I should separate these function out of the main exe file.

Thanks.

Tom
 
What you can do is declare all the types in your DLL as Friend, so they can't be seen from outside. You can then specify in your DLL that your EXE is a Friend assembly, thus allowing it to see those Friend members from the outside.

friend assemblies - MSDN Search
 
Back
Top