Prevent other programmers from using my dll component?

K

kjon

Hi, I've developed a couple of DLL assemblies component to be used with my
main exe application.

Since I need to distribute all the exe and dlls to the user PC, how can I
prevent the user, who might happen to have programming knowledge, from using
the dlls in their own application?

I know this may sound a bit paranoid, but I believe there must be some way
to prevent this. May be I should compile the dlls into the single exe or tie
the dlls to the main exe or something....??

Please advice. Thanks.
 
J

Jon Skeet [C# MVP]

kjon said:
Hi, I've developed a couple of DLL assemblies component to be used with my
main exe application.

Since I need to distribute all the exe and dlls to the user PC, how can I
prevent the user, who might happen to have programming knowledge, from using
the dlls in their own application?

I know this may sound a bit paranoid, but I believe there must be some way
to prevent this. May be I should compile the dlls into the single exe or tie
the dlls to the main exe or something....??

I don't know exactly how .NET obfuscators work, never having used one,
but you may be able to obfuscate your exe and dll at the same time, so
that name changes in the dll are reflected in the exe. That doesn't
stop anyone from using the dll, but it makes it almost impossible to
understand what's used for what.
 
L

Leon Lambert

Welcome to the complex world of CAS (Code access Security). You can key
the libraries so they can only be used by your applications. Use this
link in your Visual studio help to start diving into the topic
ms-help://MS.VSCC.2003/MS.MSDNQTR.2004APR.1033/cpguide/html/cpconCodeAccessSecurity.htm

This is an extreemly complicated subject with many options. We are in
the process of trying to get Microsoft to give us better documentation
on these issues ourself. .Net does have a lot of support but how and
where to use it are not well documented.

Hope this helps to get you started.
Leon Lambert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top