tjwlsdkzzz
Posts: 26
Joined: Fri Sep 12, 2014 10:54 am

Trial Problem

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
Trailtest.PNG
Trailtest.PNG (18.3 KiB) Viewed 2837 times
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;
}
tjwlsdkzzz
Posts: 26
Joined: Fri Sep 12, 2014 10:54 am

Re: Trial Problem

I solved the problem!!
Thank you!!
Eusebiu
Posts: 4964
Joined: Wed Nov 14, 2012 2:04 pm

Re: Trial Problem

Hi,

I'm glad you solved the problem. Just let us know anytime you have a question.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”