Results 1 to 19 of 19

Thread: protecting dll files?

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    protecting dll files?

    I'm making a class library and I dont want other people be able to use my dll file. I'm just using this dll along with one of my apps. Any way to prevent people who have my app from using my dll files?
    Last edited by MrPolite; Jan 26th, 2003 at 11:34 PM.
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Basically make heavy use of the following keywords while declaring Classes or variables

    Frenzied sorry I mean :
    • 1-Private (easy to use )
      2-Protected (from within their own Classes or derived Classes)
      3-Friend (only within the whole program.If not set , it's default , this is what you have to use )
      4-Protected Friend (accumulation of both modifiers )
      5-NotInheritable (prevent inheriting the Class)


    I can't seem to find other important techniques to protect your DLL .
    Hope this helps .......Pirate

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by pirate
    Basically make heavy use of the following keywords while declaring Classes or variables

    Frenzied sorry I mean :
    • 1-Private (easy to use )
      2-Protected (from within their own Classes or derived Classes)
      3-Friend (only within the whole program.If not set , it's default , this is what you have to use )
      4-Protected Friend (accumulation of both modifiers )
      5-NotInheritable (prevent inheriting the Class)


    I can't seem to find other important techniques to protect your DLL .
    Hope this helps .......Pirate
    well if I declare something as protected or friend, then I cant use it in other projects, ahem
    umm yeah declaring stuff as noninheritable is good. But shouldnt there be a way to totaly disable others from using my dll files?!!!
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    such as ..........???

  5. #5

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by pirate
    such as ..........???
    honestly if I knew it, I wouldn't ask it, ahem
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  6. #6
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    I'm sure you have something in mind even stupid thoughts may work sometimes .But as I said those are the only things you can use (I think )

  7. #7

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by pirate
    I'm sure you have something in mind even stupid thoughts may work sometimes .But as I said those are the only things you can use (I think )
    well, you could somehow do this with usercontrols in vb6, I dont know....
    I just remember when I was adding some stuff,vb would give me an error saying something like I dont have a license for that control or whatever...
    so I'm gussing that there should be a way to do it with dll files too (I'm hoping!)
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  8. #8
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by MrPolite
    well, you could somehow do this with usercontrols in vb6, I dont know....
    I just remember when I was adding some stuff,vb would give me an error saying something like I dont have a license for that control or whatever...
    so I'm gussing that there should be a way to do it with dll files too (I'm hoping!)
    license issue ,I guess this error happen when you use a dll or activex without registering them

  9. #9
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Check out the article in the help entitled 'Licensing Components and Controls' or just do a search in the help for 'licensing'. I've seen other examples on the net but can't seems to find them right now.

    Here are some other links that might help (I found a couple)
    http://www.xheo.com/Products/Licensi...section=Adding

    http://discuss.develop.com/archives/...nsing&f=&a=&b=
    Last edited by Edneeis; Jan 27th, 2003 at 12:21 AM.

  10. #10

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    thanks alot Edneeis I'll come back to this when I'm gunno make a final version of my dll
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  11. #11
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Can't access modifiers do this kind of protection ??

  12. #12

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by pirate
    Can't access modifiers do this kind of protection ??
    what are modifiers
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  13. #13
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by pirate
    Basically make heavy use of the following keywords while declaring Classes or variables

    Frenzied sorry I mean :
    • 1-Private (easy to use )
      2-Protected (from within their own Classes or derived Classes)
      3-Friend (only within the whole program.If not set , it's default , this is what you have to use )
      4-Protected Friend (accumulation of both modifiers )
      5-NotInheritable (prevent inheriting the Class)


    I can't seem to find other important techniques to protect your DLL .
    Hope this helps .......Pirate
    ^
    :
    :
    :
    UP

  14. #14

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by pirate
    ^
    :
    :
    :
    UP
    oh oops
    no you cant do this with modifiers
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  15. #15
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    are you sure (only one...)

  16. #16
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    while playing with classes I got this , it prevent others from creating new instances from Test Class.Private Constructor did it actually not me
    VB Code:
    1. Public Class test
    2.  
    3. Private Sub New()
    4. MsgBox("OOOP YOU GOT ME")
    5. End Sub
    6.  
    7. End Class

  17. #17

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by pirate
    while playing with classes I got this , it prevent others from creating new instances from Test Class.Private Constructor did it actually not me
    VB Code:
    1. Public Class test
    2.  
    3. Private Sub New()
    4. MsgBox("OOOP YOU GOT ME")
    5. End Sub
    6.  
    7. End Class
    then you';re gunno get the same error when you use it in your own program too!!
    also, I have some classes that have SHARED members and dnot need to be declared at all.
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  18. #18

  19. #19
    Lively Member hbandarra's Avatar
    Join Date
    Aug 2002
    Location
    Lisbon, PT
    Posts
    66
    Go to:

    http://msdn.microsoft.com/library/de...entication.asp

    and read about Code Access Security and Evidence.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width