sskanna82
Posts: 7
Joined: Wed Jun 24, 2009 7:59 am

Call a function from a standard dll

Hi,
I do not like to use the ODBC connectivity for SQL Scripts running process,Instead of that i want to create a vb.net based dll for SQL scritping process. But i dont know how to Call a function from a standard dll with advanced installer setup. I am not clear about the below document reference in Advanced Installer.Any one can suggest how to acheive this?

Call a function from a standard dll
This predefined custom action can be used to call a function from a dll. Unlike native dll custom action where the function you call must have a predefined signature this custom action allows you to call a function with any signature. Use the Edit Function dialog to easily describe the signature of the function you want to call (the result will be shown in the "Action Data" field).

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

Re: Call a function from a standard dll

Hello,

- you should setup your dll file to be installed with the rest of your files if your application needs it.
- if you only need it during the install process, then it is recommended that you add it as a Temporary File.
- from the Custom Actions page, add your custom action "Call Function From Standard DLL" in the apropriate place in the install sequence
- on the properties dialog that pops up, replace the [FolderProp] with the path to your dll. If you placed it in your application's directory then you should replace [FolderProp] with [APPDIR]
- set the other properties according to how your function is declared in your DLL.
- you can place a MessageBox call inside your function in your DLL to test if your function is properly called
If you still encounter problems feel free to post a reply with a detailed description of the issue.
Please note that you should not change the stdDllWrapper.dll found on the custom action's Source Path field. For defining your dll, use the "..." button found in the Action Data field instead.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”