Marco28
Posts: 16
Joined: Fri Sep 15, 2017 6:14 am

Callin InitTrial closes app.

We want to implement licensing in our application and therefor I created a test app to expirement. I followed the examples on the website but when running the installed app it did not show.
I added the Trial.dll to my project to debug and discovered that when it goes in to the InitTrial method the applicatio closes.

I am using Visual Studio 2017, .Net Framework 4.6.1 and Advanced Installer 14.2.1.

I have attached the project and the Advanced Installer project.

Can you please tell me what I am missing to get it work.
Attachments
TestTrial.aip
(23.12 KiB) Downloaded 495 times
TimeLimitedTest.zip
(998.59 KiB) Downloaded 460 times
Marco28
Posts: 16
Joined: Fri Sep 15, 2017 6:14 am

Re: Callin InitTrial closes app.

Can you tell me if you did some investigations into my issue?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Callin InitTrial closes app.

Hello and welcome to our forums,

Your project looks configured just fine. However, please keep in mind that you can successfully call within your application our trial.dll library only after the library is deployed/installed by the setup package. You cannot call it after you just manually copy it alongside your application executable. To correctly work the "trial.dll" must be installed by a the setup package built with AI. This is beacuse during installation on current machine are also configured the properties used by the trial feature which are machine specific.

Also, if you want to always show the trial dialog you should open your setup project in Advanced Installer and go to "Licensing" page. From the "Display" tab set the "Display Frequency percent" field to 100.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Marco28
Posts: 16
Joined: Fri Sep 15, 2017 6:14 am

Re: Callin InitTrial closes app.

Thank you for the reply as this was what I was doing incorrect.

The issue was that I did a manual copy and that this copied dll was also in the installed version. I had AI created the trial.dll, installed the application and now it is working fine.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Callin InitTrial closes app.

You're always welcome.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”