SNHookClass::SNCheck() regdate
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 31/07/2008 at 10:17, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R10.5
Platform: Mac OSX ;
Language(s) : C++ ;---------
Here's one for you. I have a MacOS X 10.5, C4D R10.5 user who can't get my plugin's serial number registered ("Wrong Serial"). Unlike the other times, this isn't 'direct' user error for sure. So, I added a couple extra MessageDialog() responses to error conditions. Well, it turns out that 'regdate' is returning the error.LONG regdate
The date of the registration, or 0 if the serial was entered for the first time.The error can only occur if regdate is 0. Okay, it's 0 the first time the serial is entered. But, for this user, it continues to remain 0 whereas it should be set to the registration date (in days) after successful entry of the serial number.
Any ideas???
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/11/2009 at 04:22, xxxxxxxx wrote:
I'm currently experiencing the same - did you find the source of the problem or any other solution to it?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/11/2009 at 07:20, xxxxxxxx wrote:
I removed this code at the top of my SNCheck() function:
if (!regdate) return SN_WRONGNUMBER;
Instead, I only check this for the demo serial number and return SN_OKAY.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/11/2009 at 03:50, xxxxxxxx wrote:
But don't you give up the e.g. 14 day restriction this way? As far as I understood it, the regdate is necessary to determine the remaining time as in curdate-regdate.
When I get 0 for regdate and return SN_OKAY all the time, the plugin becomes useable unlimited in time so I need regdate to change it's value after the first usage which is not the case.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/11/2009 at 09:38, xxxxxxxx wrote:
regdate is only 0 the first time a serial number is entered or while none has been entered.
If none has been entered, my code doesn't go into the demo check.
// - SNHookClass.SNCheck //*---------------------------------------------------------------------------* LONG SNCheck(const String& c4dsn, const String& sn, LONG regdate, LONG curdate) //*---------------------------------------------------------------------------* { if (!sn.Content()) return SN_WRONGNUMBER; // Demo mode (14 day trial) if (sn.GetLength() == 4L) { // Case-insensitive serial number 'demo' if (sn.LexCompare("DEMO")) return SN_WRONGNUMBER; if (!regdate) { mode = 1; return SN_OKAY; } // Calculate timeout of Demo or Beta modes LONG timeout = 14L - (curdate - regdate); if (timeout < 0L) return SN_EXPIRED; time = timeout; mode = 1; if (timeout <= 14L) return SN_EXPIRE_14 - timeout; return SN_OKAY; }
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/11/2009 at 08:30, xxxxxxxx wrote:
I think I misunderstood your initial post then
Originally posted by xxxxxxxx
Okay, it's 0 the first time the serial is entered. But, for this user, it continues to remain 0 whereas it should be set to the registration date (in days) after successful entry of the serial number.
I'm having this effect even with if(!regdate) return SN_OKAY;
The user enters DEMO and it's not only 0 the first time but although all registering obviously occured it keeps 0 causing the effect of unlimited usage.I also don't allow entering nothing i.e. I'm returning SN_WRONGNUMBER too if sn contains an empty string.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/11/2009 at 16:27, xxxxxxxx wrote:
I see. I think the problem was that the user's information was not being stored correctly (in the Registry for Windows or wherever MacOS stores this information). It may be Vista/Win7 or a faulty Registtry if this is a Windows user. I think for MacOS X it may be a permissions problem. Not sure how this was resolved (if ever).
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/11/2009 at 01:27, xxxxxxxx wrote:
Ok thanks, I will do some investigation work about that. Thanks for pointing me the direction
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/01/2010 at 09:30, xxxxxxxx wrote:
I have the same problem! The regdate is fixed to 0 and didn't change!
Any solutions found? -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/01/2010 at 03:17, xxxxxxxx wrote:
Not really. If I remember it right in our case it seemed that once you return SN_EXPIRED at the same date (day) of first registering the plugin (setting regdate) it somehow got stuck to 0.
Also sometimes there indeed was a Console message from C4D about not being able to write to the registry which obviously was not related to the case above though and appeared neither predictable nor reproduceable.
But the general issue that in some not-fully-understandable cases regdate stays fixed to 0 has driven us to the decision not to use SNHook at all and we further stick to the classic own license dialog and Read/WritePluginInfo()..