Serial Numbers, Demo, and LexCompare



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 29/05/2011 at 23:40, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R12 
    Platform:   Windows  ;   Mac OSX  ; 
    Language(s) :     C++  ;

    ---------
    I've been noticing a trickling stream of user notifications that if they use the demo of any of my plugins (which accept case-insensitive versions of 'demo') in C4D R12  then they can enter variations of case for the word and get 30 more days.  How many 30-day sets is this (too tired to do the permutations atm)?  Too many as far as I can estimate.  What is this?  How can this happen?  Never had any notifications in previous versions of C4D.  And my code has not changed at all.  Must I really restrict to case-sensitive because there is something weird here?  Maybe with a variation, there is a new registration trigger?  How can I anticipate and stop this?

    Thanks,



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 30/05/2011 at 03:12, xxxxxxxx wrote:

    I'd say, force any user input to upper case and compare it with an upper case "DEMO", using the standard Compare() function, Did I understand you right?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 30/05/2011 at 12:22, xxxxxxxx wrote:

    That is how I used to do it: case-sensitive, all uppercase.  I changed that to be case-insensitive because too many users didn't get that they had to enter the text in strictly uppercase.  And that seemed to work.  But with R12 it seems that the lexical compare is, dunno, resetting the regdate when the text changes case.  Might have to go back to strict case-sensitivity I suppose.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 30/05/2011 at 14:41, xxxxxxxx wrote:

    But you don't have to. What I think Jack meant was, get the user input (upper or lower case, doesn't matter) then convert it to upper case using String::ToUpper, and compare to the string 'DEMO'. Then it doesn't matter what the user types in.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 30/05/2011 at 18:26, xxxxxxxx wrote:

    Hadn't thought about that.  I was thinking the other way around: just compare the user input case-insensitively using LexCompare().  But since that doesn't seem to work, ToUpper() may be a solution.

    Still, I did reread an old post here in which someone mentioned that regdate was not always being updated so I might include a secondary means to check the demo time limit as well.

    Thanks, guys! :)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 31/05/2011 at 02:43, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    What I think Jack meant was, get the user input (upper or lower case, doesn't matter) then convert it to upper case using String::ToUpper

    That is exactly what I meant ;-)


Log in to reply