Markus
Posts: 11
Joined: Fri Mar 05, 2010 10:49 am

Calling a function inside a DLL with parameters

Hello,

I ran into another problem. When the MSI package is uninstalled I need to call a function inside a DLL. I used the wizard to create an action under InstallExcuteSequence and Uninstall. Everything works fine if the function does not require any parameters but one function I need to call has two parameters, one string and an integer.
Is it possible to call functions with parameters? And how declare the parameters or where do I need to put them?


Regards
Markus.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Calling a function inside a DLL with parameters

Hi Markus,

You might want to look into using the Call function from standard DLL custom action.
Only configure the options in the "Edit Function" dialog that pops up when adding the custom action. Configure it to match your function's signature.

Do let me know how this worked for you.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Markus
Posts: 11
Joined: Fri Mar 05, 2010 10:49 am

Re: Calling a function inside a DLL with parameters

Hello Gabriel,

I tried it but unfortunately without any success. Either the function is not called or I get an error when the package in uninstalled.
When I use the edit function, function name and parameters are inserted in action text and this string is difficult to maintain in my opinion.
My DLL is a Win32 DLL compiled with Visual C++ 6. I assume the problem is related on how the string is passed to the function. I tried to use "TEXT" and TEXT. Both did not work.


Regards
Markus.

Return to “Common Problems”