Welcome to Dream.In.Code
Getting C# Help is Easy!

Join 132,614 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 957 people online right now. Registration is fast and FREE... Join Now!




SET Expiry Date

 
Reply to this topicStart new topic

SET Expiry Date, c#

venkatc
post 9 Jul, 2008 - 10:43 PM
Post #1


New D.I.C Head

*
Joined: 9 Jul, 2008
Posts: 1

how Can set Expiry date for one Product Using C#
User is offlineProfile CardPM

Go to the top of the page

BetaWar
post 9 Jul, 2008 - 11:16 PM
Post #2


#include <soul.h>

Group Icon
Joined: 7 Sep, 2006
Posts: 1,987



Thanked 78 times

Dream Kudos: 1175
My Contributions


Well, if you are making the product you could go on and place a date into th ecode and hav it check the current date against the date in the code, if the date in the code has passed have the program not do anything. But that only works if you are releasing a beta that will work until say December 21, 2009 and is the same for everyone.

If you have a trial type of thing you will need to write a data file upon instalation that is protected in some way (so the user can't easily read/edit it) and then set the expiration date X number of days from the current date, again comparing dates whenever the program is used. You will probably also want to add in some fail safe so that if the data file can't be found the program doesn't do anything anyway, that way the user can't fool it into thinking it has more (infinite) time than it really does.

If you wanted you could also write the date to a computer registry or any other number of things.

I personally am not a C# programmer, but I believe the theory is the same.
User is offlineProfile CardPM

Go to the top of the page

born2c0de
post 9 Jul, 2008 - 11:44 PM
Post #3


printf("I'm a %XR",195936478);

Group Icon
Joined: 26 Nov, 2004
Posts: 3,905



Thanked 34 times

Dream Kudos: 2800

Expert In: 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing

My Contributions


BetaWar is correct.
But keep in mind that such techniques can easily be bypassed or removed by amateur reversers, so as long as it's an assignment question or a hobby project you should do fine with BetaWar's idea.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/23/08 02:50AM

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month