8654b733ea
Files correlati : ca1.exe Ricompilazione Demo : [ ] Commento : Evitato di uscire da programma di stampa anialitica dopo ogni stampa git-svn-id: svn://10.65.10.50/branches/R_10_00@22568 c028cbd2-c16b-5b4b-a496-9718f37d4682
58 lines
1.0 KiB
C++
Executable File
58 lines
1.0 KiB
C++
Executable File
#define __STDTYPES_CPP
|
|
|
|
#include <applicat.h>
|
|
#include <dongle.h>
|
|
#include <prefix.h>
|
|
|
|
// @doc INTERNAL
|
|
|
|
// @func Ritorna il numero di serie della chiave
|
|
//
|
|
// @rdesc Numero di serie della chiave
|
|
int get_serial_number()
|
|
{
|
|
TDongle& din = dongle();
|
|
bool ok = din.ok();
|
|
if (!ok)
|
|
ok = din.login();
|
|
return ok ? int(din.number()) : -1;
|
|
}
|
|
|
|
bool test_assistance_year()
|
|
{
|
|
int dongle_year = TDate(TODAY).year();
|
|
|
|
if (get_serial_number() > 0)
|
|
{
|
|
const int new_year = dongle().year_assist();
|
|
if (new_year >= 2008 && new_year <= dongle_year)
|
|
dongle_year = new_year;
|
|
}
|
|
|
|
int app_year, dum1, dum2, dum3;
|
|
bool ok = TApplication::get_version_info(app_year, dum1, dum2, dum3);
|
|
if (ok)
|
|
ok = app_year <= dongle_year;
|
|
return ok;
|
|
}
|
|
|
|
// @doc INTERNAL
|
|
|
|
// @func Inizilizza le variabili globali
|
|
void init_global_vars()
|
|
{
|
|
prefix_init();
|
|
}
|
|
// @doc INTERNAL
|
|
|
|
// @func Dealloca le variabili globali
|
|
void free_global_vars()
|
|
{
|
|
destroy_dongle();
|
|
prefix_destroy();
|
|
}
|
|
|
|
|
|
|
|
|