Home › Forums › C Programming › license validation
- This topic has 2 replies, 2 voices, and was last updated 14 years ago by
saqib.
Viewing 2 reply threads
- AuthorPosts
- May 4, 2009 at 12:56 pm #2193
saqib
Participanthi,
i need license validation code.if any body having the idea how to validate license based on the duration help me.regards
suresh - May 4, 2009 at 5:48 pm #3563
GWILouisaxwzkla
ParticipantIf you want to see if a date is less than another , I would do:
123456789101112131415161718192021222324<br />if ( expirationYear > licenseYear )<br />licenseValid = true;<br />else if ( expirationYear == licenseYear )<br />{<br />if ( expirationMonth > licenseMonth )<br />licenseValid = true;<br />else if ( expirationMonth == licenseMonth )<br />{<br />if ( expirationDay > licenseDay )<br />licenseValid = true;<br />else if ( expirationDay == licenseDay )<br />licenseValid = true;<br />else<br />licenseValid = false;<br />}<br />else<br />licenseValid = false;<br />}<br />else<br />licenseValid = false;<br /><br /><br /> - May 5, 2009 at 6:12 am #3564
saqib
Participanthi,
thanks for you reply.
my problem is this software running in the client side.if client changes the system date and time then that valdiation is wont works.if have any alternate solution help me.thanks & regards
suresh
- AuthorPosts
Viewing 2 reply threads
- The forum ‘C Programming’ is closed to new topics and replies.