THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/02/2010 at 16:05, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 11.5
Platform: Windows ;
Language(s) : C++ ;
---------
I am trying to set up my plugin so that it works 100% in the DEMO version of C4D without having to be registered.
Here's what I am trying.
//SERIAL CODE/////////////////////////////////
//////////////////////////////////////////////
class PlanetXSerial : public SNHookClass
{
private:
const String title;
String name;
Bool sn_ok;
public:
PlanetXSerial() : title("Planet X Generator") {}
virtual LONG SNCheck(const String &c4dsn,const String &sn,LONG regdate,LONG curdate)
{
LONG err=0;
SerialInfo si;
GeGetSerialInfo(SERIAL_CINEMA4D, &si);
LONG mySN = si.nr.SubStr(6,5).StringToLong(&err);
LONG myAlgorithm = **REMOVED**
String mySerial = LongToString(myAlgorithm);
if (GeGetVersionType() == VERSION_DEMO)
{
GePrint("DEMO");
sn_ok = TRUE;
return SN_OKAY;
}
else
{
if (sn == mySerial)
{
GePrint("LICENSED");
sn_ok = TRUE;
return SN_OKAY;
}
else
{
GePrint("WRONG SERIAL");
sn_ok = FALSE;
return SN_WRONGNUMBER;
}
}
}
virtual const String& GetTitle()
{
return title;
}
Bool IsSerialOK() const { return sn_ok; }
};
PlanetXSerial *snhook = NULL;
Bool RegisterPlanetXSerial()
{
snhook = gNew PlanetXSerial;
return snhook->Register(ID_PLANET_OBJECT_SERIAL, SNFLAG_OWN);
return FALSE;
}
void FreePlanetXSerial()
{
if (snhook)
gDelete(snhook);
}
Bool IsSerialOKHook()
{
if (snhook)
return snhook->IsSerialOK();
return FALSE;
}
The problem is with what I have, is not allowing the plugin to be loaded in the DEMO version of C4D. Does anyone see a problem with this setup?
Thanks,
~Shawn