Prevent other programmers from using my dll component?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kjon

    Prevent other programmers from using my dll component?

    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.


  • Jon Skeet [C# MVP]

    #2
    Re: Prevent other programmers from using my dll component?

    kjon <2@22.co> wrote:[color=blue]
    > 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....??[/color]

    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.

    --
    Jon Skeet - <skeet@pobox.co m>
    Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

    If replying to the group, please do not mail me too

    Comment

    • Leon Lambert

      #3
      Re: Prevent other programmers from using my dll component?

      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.2004 APR.1033/cpguide/html/cpconCodeAccess Security.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

      kjon wrote:[color=blue]
      > 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.
      >
      >[/color]

      Comment

      • Sijin Joseph

        #4
        Re: Prevent other programmers from using my dll component?

        You need to give a StrongName to your main exe and in your DLL's ensure
        that all callers have a StrongNameIdent ityPermission of the main exe's
        strong name.



        Sijin Joseph





        kjon wrote:[color=blue]
        > 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.
        >
        >[/color]

        Comment

        Working...