Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Protect DLL

Protect DLL

Scheduled Pinned Locked Moved C#
questiontutorial
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mohib Sheth
    wrote on last edited by
    #1

    Hey guyz, I am currently working on a project and using many ddl files. My question is.. How to protect those dll files so that when I deploy it on the client machine.. nobody can leech and use it for themselves? I hope you guyz got my point. Thanks.

    ------------------------------------------------------------------ Life would have been much easier if I had the source-code!!

    N M 2 Replies Last reply
    0
    • M Mohib Sheth

      Hey guyz, I am currently working on a project and using many ddl files. My question is.. How to protect those dll files so that when I deploy it on the client machine.. nobody can leech and use it for themselves? I hope you guyz got my point. Thanks.

      ------------------------------------------------------------------ Life would have been much easier if I had the source-code!!

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Swader wrote:

      nobody can leech and use it for themselves?

      You can protect the methods by using internal access modifier. Internal members can be access only in the same assembly.


      My Website | Ask smart questions

      M 1 Reply Last reply
      0
      • N N a v a n e e t h

        Swader wrote:

        nobody can leech and use it for themselves?

        You can protect the methods by using internal access modifier. Internal members can be access only in the same assembly.


        My Website | Ask smart questions

        M Offline
        M Offline
        Mohib Sheth
        wrote on last edited by
        #3

        Oke. I know that. But the problem is.. I use the same dll for other apps too. Its kinda a shared dll. What to do about that? Also.. Is there a way where I can merge all the dll's in one single file or any other way to manage them so that it doesnt look ugly :) Thanks for the help.

        ------------------------------------------------------------------ Life would have been much easier if I had the source-code!!

        L 1 Reply Last reply
        0
        • M Mohib Sheth

          Oke. I know that. But the problem is.. I use the same dll for other apps too. Its kinda a shared dll. What to do about that? Also.. Is there a way where I can merge all the dll's in one single file or any other way to manage them so that it doesnt look ugly :) Thanks for the help.

          ------------------------------------------------------------------ Life would have been much easier if I had the source-code!!

          L Offline
          L Offline
          leppie
          wrote on last edited by
          #4

          Make sure only you can call those libraries. You basically just need to have some mechanism to put someone off (the idea of stealing), by making it break when they attempt to use it.

          xacc.ide
          The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."

          1 Reply Last reply
          0
          • M Mohib Sheth

            Hey guyz, I am currently working on a project and using many ddl files. My question is.. How to protect those dll files so that when I deploy it on the client machine.. nobody can leech and use it for themselves? I hope you guyz got my point. Thanks.

            ------------------------------------------------------------------ Life would have been much easier if I had the source-code!!

            M Offline
            M Offline
            Mohib Sheth
            wrote on last edited by
            #5

            Oke.. Allright.. So basically.. there is no simple way of safeguarding a dll. So.. Atleast.. is there a way.. I can organize all the ddl's a subfolder? Suppose.. I have an application say.. Abc.exe So when I Build it.. The exe and the dll gets copied to the bin folder. How can I make it store all the dll in a subfolder? Thanks.

            ------------------------------------------------------------------ Life would have been much easier if I had the source-code!!

            N 1 Reply Last reply
            0
            • M Mohib Sheth

              Oke.. Allright.. So basically.. there is no simple way of safeguarding a dll. So.. Atleast.. is there a way.. I can organize all the ddl's a subfolder? Suppose.. I have an application say.. Abc.exe So when I Build it.. The exe and the dll gets copied to the bin folder. How can I make it store all the dll in a subfolder? Thanks.

              ------------------------------------------------------------------ Life would have been much easier if I had the source-code!!

              N Offline
              N Offline
              N a v a n e e t h
              wrote on last edited by
              #6

              Swader wrote:

              How can I make it store all the dll in a subfolder?

              Create a sub folder inside bin directory, copy dll's over there, and refer it from there.


              My Website | Ask smart questions

              M 1 Reply Last reply
              0
              • N N a v a n e e t h

                Swader wrote:

                How can I make it store all the dll in a subfolder?

                Create a sub folder inside bin directory, copy dll's over there, and refer it from there.


                My Website | Ask smart questions

                M Offline
                M Offline
                Mohib Sheth
                wrote on last edited by
                #7

                So will that work the same way.. even if I were to change the location of the folder or after I deploy?

                ------------------------------------------------------------------ Life would have been much easier if I had the source-code!!

                L 1 Reply Last reply
                0
                • M Mohib Sheth

                  So will that work the same way.. even if I were to change the location of the folder or after I deploy?

                  ------------------------------------------------------------------ Life would have been much easier if I had the source-code!!

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  You can use a licensing scheme like CryptoLicensing: 1. Expose a public method like "SetLicenseCode" 2. Call this method with a valid license key. 3. The dll methods ill work only if a valid license key has been provided. This will ensure that others cannot use your dll.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups