BobRozman
Posts: 2
Joined: Thu Jan 10, 2013 5:04 pm

Custom Action - Call Function From Standard DLL

Greetings,

I am trying to call a function from a standard DLL via a custom action. I cannot get this to work. Each iteration I have tried results in the same message from the AI error log - "Function xxxx not found in DLL"

MSI (c) (1C!08) [13:56:27:614]: Product: DllTest -- Error 4151. Function 'MyFunction' not found in DLL...

The attached file contains an Advanced Installer project that focuses on what I am trying to accomplish. My standard DLL is placed in the windows temp folder, I have a custom action to call a function in that DLL, and I wired the custom action to Welcome Dialog's "Next" button.

The file also contains the Visual Studio 2010 project that I used to build the test DLL.

Could you please take a look and advise me as to what I am doing wrong?
Thank you
Attachments
DllTest.zip
(676.44 KiB) Downloaded 427 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Custom Action - Call Function From Standard DLL

Hi and welcome to Advanced Installer forum.

Thank you for your interest in Advanced Installer.

I looked over your DLL file with "CFF Explorer" application and and I found that there is no function exported in it.

If you create your own DLL file it is recommended to create a native DLL. In this case you can use a "Launch attached file" custom action which will automatically show you all the function in your DLL file.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
akmal
Posts: 2
Joined: Mon Aug 25, 2014 6:02 am

Re: Custom Action - Call Function From Standard DLL

I have similar problem.

I tried to call function from a DLL i created using Wix VB Custom Action.

Then, I add to the advanced installer project using "Call function from native DLL"

When I run the project, in log file is shows:

Code: Select all

Error: custom action method "TestMsgBox" is missing or has the wrong signature.
How can i make this work?

Thanks,

regards,
Akmal
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Custom Action - Call Function From Standard DLL

Hello Akmal and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

Can you please make sure that when creating the VB.NET custom action you are proceeding like it is described in the "Custom Action - Explaination" thread and see if this helps you? Otherwise in order to investigate this further it would be really useful if you could isolate the behavior in a sample or in a detailed step by step test case and send it us to support at advancedinstaller dot com so we can investigate it.

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

Return to “Common Problems”