| A better way to protect your Delphi projects | ||||||||||||||||||||||||
| mxProtector component was designed for quick implementation of application protection functions. You can create time-trial and password protected applications. You can set the maximum number of execution, and it can work with registration keys as well. | ||||||||||||||||||||||||
This article is an extension to "Protect your Delphi Software" discussion, intended to point you to some general and more specific solutions to software protection. Today, we'll take a closer look at one Delphi component that has everything you need in one place.
The mxProtector is available from Max's component page, on the downloads page you can see that mxProtector is distibuted as freeware for Delphi version 5 and 6; mxProtector for Delphi 7 is distributed as shareware. Source code for all versions is available on purchase.
The mxProtector component comes with 8 demo projects, each coded to explain one of the protection types.
In this article we'll explore one of the demo projects, namely how mxProtector deals with day trial expirations - the possibility to disable program usage after X days or after some specific TDateTime value (date and time).
First, let's see how to use the mxProtector for a day trial protection, in general:
2. If you want to start the initialization manually switch the poAutoInit off in the Options, and do not forget to call the Init method in your code.
3. Choose protection type or types, and set the ProtectionTypes property accordingly.
4. If you have chosen day trial protection, fill up the MaxDayNumber property. It is the number of days while your software runs after first start. Please note that this property is read-only in run-time. Now you have to create the following events: OnExpiration (Will be called when the trial time expired), OnDayTrial (Will be called if more than 1 day remaining). It gives your information about how many days remaining from trial period). If you include the poCheckSystemTime in Options, component checks user's computer Bios date and time. If it was set back, the OnInvalidSystemTime event will be called. Warning: If the poWorkAfterExpiration is included in Options, then OnDayTrial will be called after expiration date.
5. With day trial protection the begin time will be the day of first application start on the client's computer.
Note, the above text, was copied from the readme.txt file placed in the mxProtector setup folder. The readme.txt file describes the steps needed to "set-up" the component for all other protection types.
![]() The code behind
The OnDayTrial event is a perfect place to put some warning message displaying how many days are left for the user to test your software. The OnExpiration event gets fired when the license has been expired. Use it to disable some (or all) features of your software.
Remember that if you include the poCheckSystemTime in Options, mxProtector checks user's computer Bios date and time. If it was set back, the OnInvalidSystemTime event will be called.
mxProtector - a relief in Delphi protectionTo be honest I'm quite amazed with this component! It's *free*, no free sources though. Sources for Delphi 7 version are available for 40 EUR.If you know of any other Delphi protection component that can be marked as "all-in-one", please do send me an email. That's it on software protection for the moment - I hope unregistered users won't bother you any more! Want a better licensing policy for your Delphi applications?mxLicence Manager tool supports easy implementation of licence management under Borland Delphi 4,5,6,7. Users of the application can share their licences on standalone PC or over the network. License administrators can control who uses the licensed application.The client application communicates with the licence server through TCP/IP protocol. The client application and the license server can run on separate computers on your network... |
||||||||||||||||||||||||

1. Drop the component on your form.
