sometimes i want my applications to expire after a specified date.
I did it like this .. perhaps this helps others who want to do the same .. be free to
copy it into your
application. :)
Its simple, but helpful ...
{
DateTimeType testdate;
UInt32 seconds;
seconds=TimGetSeconds();
TimSecondsToDateTime(seconds,&testdate);
//expiration date - here: 31th december 2002
testdate.day=31;
testdate.month=12;
testdate.year=2002;
//only reset
testdate.second=0;
testdate.hour=0;
testdate.minute=0;
if(TimGetSeconds()>=TimDateTimeToSeconds(&testdate))
{
//expired
FrmGotoForm(expired);
}
else
{
//ok, start application
FrmGotoForm(frmMain);
}
return true;
}
--
<knack> - Was ist das ? - Blaues Licht !
Was macht es ? - Es leuchtet blau !
[Rambo]
--
<knack> - Was ist das ? - Blaues Licht !
Was macht es ? - Es leuchtet blau !
[Rambo]
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/