How to write a licencng program.
Let us say if I want to sell a product to a perticular customer and wants that product shud be expired after a month.
how I can do this.
If program checks local system date, always the user can change local m/c s system date so that the product never expires.
Store the date the program first ran in some cryptic form in one of your apps datafiles. Everytime you start up, check to see if the date is later, if not, exit, if so, store that date as well, you can bump this date everytime the program runs, 30 days later, exit.
Not particulaly sophisticated but easy to do.
If the system is running windows, check the date of the pagefile and a few of the files in the windows system directory. This should give you the minimum time to lookout for when your program first starts up, and, normally, the pagefile contains the date and time the computer was last rebooted (as it's opened on bootup, and modified continuously thereafter)