By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 1,022 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

Copy protection

P: n/a
Seems like the copy protection (ie licensing/antipiracy) tool that I
used with VB6 isn't very compatible with VB.Net. Anyone have a
recommendation for one that works well with VB.Net applications? Only
basic protection is really needed, so simple to use and cheap are more
important than absolute protection.

JGD
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi,

Licensing.
http://windowsforms.net/articles/Licensing.aspx

Ken
-------------------------
"John Dann" <ne**@prodata.co.uk> wrote in message
news:66********************************@4ax.com...
Seems like the copy protection (ie licensing/antipiracy) tool that I
used with VB6 isn't very compatible with VB.Net. Anyone have a
recommendation for one that works well with VB.Net applications? Only
basic protection is really needed, so simple to use and cheap are more
important than absolute protection.

JGD
Nov 21 '05 #2

P: n/a
Hi John,

I had a similar problem and solved this by using MD5 encryption - do a few
searches on Google and you will find suitable examples. I generate a unique
Key string based on a number f parameters that I ask them to send me. This
does a comparison with the string that their entries will generate, and if
there is a match then the registered version loads. The application that I
distribute works with a server - hence the application is locked to that
server. Below is the function that I used:-

Imports System.Text
Imports System.Security.Cryptography
Module modEncrypt
Public Function HashData(ByVal s As String) As String
'Convert the string to a byte array
Dim bytDataToHash As Byte() = _
(New UnicodeEncoding()).GetBytes(s)
'Compute the MD5 hash algorithm
Dim bytHashValue As Byte() = _
New MD5CryptoServiceProvider().ComputeHash(bytDataToHa sh)
Return BitConverter.ToString(bytHashValue)
End Function
End Module
I call the function with somethin g like:-

txtKeyCode.Text = HashData(sServer & sVersion & sApplication)

txtKeyCode.Text is the Key that I send to them that makes a comparison to
the key genrerated in their application.

Hope this is self explanatory and that it helps you. It seems to work very
well for me.

Paul

<ne**@prodata.co.uk> wrote in message
news:66********************************@4ax.com...
Seems like the copy protection (ie licensing/antipiracy) tool that I
used with VB6 isn't very compatible with VB.Net. Anyone have a
recommendation for one that works well with VB.Net applications? Only
basic protection is really needed, so simple to use and cheap are more
important than absolute protection.

JGD

Nov 21 '05 #3

P: n/a
Thanks Ken and Paul for the replies. The .Net LicenseClass looks
interesting, but I'm struggling a little to follow what I guess are
the C# examples. Presumably there's not a simple VB.Net example
anywhere (I couldn't see one in the download)?

And the roll your own approach is interesting too and probably
adequate for my needs in this instance, but for a WinForm application
that's not locked to an individual PC specification I guess you're
going to need to write something to the registry to persist any key or
licence-dependent information between sessions (since storing in a
simple file would presumably make it too easy to copy). And registry
writing is something I've tended to steer clear of, but maybe I need
to learn more about this.

John Dann
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.