SNHook class and demo expiry



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

    On 07/05/2006 at 00:00, xxxxxxxx wrote:

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

    ---------
    I'd like to know how one should proceed with calculating a demo expiry other than 14 days (say 30 or 90 days). It is difficult to test since once you enter a valid registration, it is cached some place. Also, it would not be practical to actually wait 30 or 90 days to see the results. :)

    Thanks,



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

    On 07/05/2006 at 01:25, xxxxxxxx wrote:

    Not sure if this is what you want. For longer expirations here is an example straight out of one of my plugins:

    LONG exptime = curdate-regdate;  
    LONG expired = 30; //this is how long the demo should run  
      
    if(exptime<expired)  
    {  
    //The demo is not yet expired  
    //if it´s only 2 days left...  
    if(exptime>=expired-2)   
         //this will tell the user (cinema 4d gives a msg)  
         return SN_EXPIRE_14-(expired-exptime);   
    }
    

    Hope that helps.
    Katachi



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

    On 07/05/2006 at 01:30, xxxxxxxx wrote:

    Thank you very much, Katachi!



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

    On 09/06/2009 at 16:40, xxxxxxxx wrote:

    Hi Folks,
       Any suggestions for making an expiring demo that can't easily be reset by trashing the StartTime/product key file from User/Library/Preferences/Maxon/CinemaWhateverVersion/prefs/ ?
       I need to collect data on the number of people using a little plugin I plan to release this week and I'd like to compare the number of raw downloads to the number of people that actually register after a very short trial period.
       I currently bury a StartTime in the product key file and use it to expire the demo version as implied in Katachi's example above. Works fine, but the user can just trash the pref file and get a fresh start rather than being forced to register (a painless but necessary process). My approaches to avoid this:

    1. Put StartTime in the actual Plugin File, recompile. Problem: No longer supposed to write files to the Applications/Maxon/Cinema4D11/Plugins folder.
    2. Bury StartTime somewhere deeper in the User/Library/Preference/Maxon/Cinema..../someDeepFolder. Problem: Seems sloppy, probably illegal from the Development team perspective, there aren't many deep folders in prefs, so the file can still be ditched.
    3. Hard Code a start date into my release and change it every day. Problem... horrible idea.
    4. Write some sort of .php script that will generate a StartTime File, perhaps an invisible one, that will load into my Plugin's Download folder with the plugin and a WebLoc reference file, zip the whole thing and upload it. Problem- I have no idea how to do such a think on the server side, i.e, no knowledge or experience with PHP.
    5. Just make them register first and forget the whole demo thing. Problem: This will turn away a lot of potential users before they discover the utility of the plugs, and its not as fun as solving one of the other problems above.

    I think it would also be handy to compile the serial file before I write it so I don't have to create my own encryption algorithms for storing simple things like start dates... I notice that 3Dkiwi's amazing Python wrapper plugin seems to do this. It would be easy if I could place the compiled file in the same folder as the plugin, but since that is illegal, I'd have to place it in User/.../prefs. Problem is, if the compiled serial file lies outside of the Applications/Maxon/C4d/plugins/myplugin..., I can't "include" it into the original plugin, so I'd appreciate any suggestions on this as well.



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

    On 10/06/2009 at 00:52, xxxxxxxx wrote:

    You could use Read/WritePluginInfo or alternatively Read/WriteRegInfo in a license server enviroment to read/write data to the Windows registry or the OSX preference files.

    cheers,
    Matthias



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

    On 10/06/2009 at 14:52, xxxxxxxx wrote:

    Woops, I didn't realize when I tacked on to the end of this discussion that it was for C++. I'm guessing this is all beyond C.O.F.F.E.E.'s grasp.


Log in to reply