DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Dll protection

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    Dll protection

    [Originally posted by Goravani]

    I am developing a commercial application.I have developed some DLL files for using it in my program.How can i protect my DLL files from crackers,who may use my DLL's for their program..Is there any way ?

    Gaurav.

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Dll protection

    [Originally posted by neophile]

    You can code in an Authenticate() method or something in each class...


    Option Explicit

    Private Const kKey As String = "samplekey"
    Private mAuthenticated As Boolean

    Private mSomeProp As Long


    Public Function Authenticate(ByVal Key As String) As Boolean
    mAuthenticated = (kKey = Key)
    Authenticate = mAuthenticated
    End Sub

    Public Property Let SomeProp(ByVal vData As Long)
    If mAuthenticated Then mSomeProp = vData
    End Property
    Public Property Get SomeProp As Long
    SomeProp = mSomeProp
    End Property

    Public Sub MakeAbsolute
    If mAuthenticated Then mSomeProp = Abs(mSomeProp)
    End Sub


    ... Of course, you might want a more complex key authentication concept than what I've exampled here ;) There's probably a better way, but I'm pressed for time and I don't know it, anyway ;)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center