seba.netventure
Posts: 3
Joined: Tue Jun 20, 2023 10:01 am

Trial is not working or throws exception 0xC0000005

Fri Jan 26, 2024 5:03 pm

Hello, I am adding the trial feature to a product of mine but I am having issues.

I made a small project in order to keep it simple and I've attached it.

The project code only implements the functions in the following guide:
https://www.advancedinstaller.com/user- ... using.html

and just tries to invoke

Code: Select all

int main()
{
	std::cout << "Hello World!\n";

	int ret = DisplayRegistrationDlg(kLibraryKey, NULL);

	std::cout << "Goodbye World!\n";

	if (ret == -1)
		exit(0);
}
Then, after the build, I've created an installer, which is included in the zip, and I've created a new trial and I've set the library key in my code.
Then I've built it, created the installer and installed everything. If I run the program, what I get is

Code: Select all

C:\Program Files\Begué\LicenseTest> .\LicenseTest.exe
Hello World!
Missing Trial DLL
Goodbye World!
Which mean that it's not even loading the lib, even if it's located in the same folder.

Can you please guide me?
Attachments
LicenseTest.zip
(9.49KiB)Downloaded 32 times

seba.netventure
Posts: 3
Joined: Tue Jun 20, 2023 10:01 am

Re: Trial is not working or throws exception 0xC0000005

Mon Jan 29, 2024 3:27 pm

I was referencing the wrong DLL file. I've started using the x86 dll and everything works.

The hard thing to understand, thought, is how to debug it.

Sorry.

Catalin
Posts: 6506
Joined: Wed Jun 13, 2018 7:49 am

Re: Trial is not working or throws exception 0xC0000005

Wed Jan 31, 2024 4:49 pm

Hello and welcome to our forums,

Thank you for your followup on this and for sharing the solution with us.

We're glad everything is working as expected now.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”