Hi,
I have a problem testing Trial.
I set the uses limited( 10 uses).
The problem is after the 1st use, the registration dialog comes up saying 9 uses left
And I execute the program, it continually 9 uses left.
I use only this.
What is the problem?? TT
int ClicensingApp::InitLicensingSupport(LPCSTR aKeyCode, HWND aHWnd)
{
HMODULE hModule = ::LoadLibraryA("Trial.dll");
//HMODULE hModule = NULL;
if(hModule == NULL)
return -1; // Missing Trial DLL;
TrialFcn readSettingsProc = reinterpret_cast<TrialFcn>(
::GetProcAddress(hModule, "ReadSettingsRetStr"));
/*ReadSettingsRetStr - the DLL entry function that does the initialization of the licensing support
but will NOT kill the application when trial expired and unlicensed, instead will return a value greater or equal with 4.*/
if(readSettingsProc == NULL)
return -1; // Missing Trial DLL;
// Return values:
// "0" - the application is registered (a valid license key was found);
// "2" - the application is in trial mode;
// If the application trial period has expired and the user will NOT enter
// a valid license key, the process will be killed by the function
// instead of returning one of the codes above.
int ret = readSettingsProc(aKeyCode, aHWnd);
::FreeLibrary(hModule);
return ret;
}
FOLLOW US