Home Forums C Programming license validation

Viewing 2 reply threads
  • Author
    Posts
    • #2193
      saqib
      Participant

      hi,
      i need license validation code.if any body having the idea how to validate license based on the duration help me.

      regards
      suresh

    • #3563
      GWILouisaxwzkla
      Participant

      If you want to see if a date is less than another , I would do:


      if ( expirationYear > licenseYear )
      licenseValid = true;
      else if ( expirationYear == licenseYear )
      {
      if ( expirationMonth > licenseMonth )
      licenseValid = true;
      else if ( expirationMonth == licenseMonth )
      {
      if ( expirationDay > licenseDay )
      licenseValid = true;
      else if ( expirationDay == licenseDay )
      licenseValid = true;
      else
      licenseValid = false;
      }
      else
      licenseValid = false;
      }
      else
      licenseValid = false;


    • #3564
      saqib
      Participant

      hi,
      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

Viewing 2 reply threads
  • The forum ‘C Programming’ is closed to new topics and replies.