Friday, 27 August 2010

C++ code to make your application a trial version

{
time_t rawtime, end;
struct tm * endinfo;
double dif;
time ( &rawtime );
endinfo = gmtime ( &rawtime );
endinfo->tm_year = year-1900;
endinfo->tm_mon = Month-1;
endinfo->tm_mday = Day;
end = mktime ( endinfo );
dif = difftime(end, rawtime);
if (dif less than 0)
printf("\nTrial Version Expired \n");
}
Year, Month and Day are all integers. Enter your Date on which you want the application to be expired.

No comments:

Post a Comment