Hi,
DLL functions used as custom action must have the following signature:
Code: Select all
UINT __stdcall MyCustomAction(MSIHANDLE hInstall)
The MSIHANDLE is passed as an argument to the DLL Custom Action function. Also you need to export the function using a module-definition (.DEF) file. To take the value of a property in the DLL function use MsiGetProperty function:
Code: Select all
UINT res = ::MsiGetProperty(hInstall, _T("APPDIR"), szValue, &dwLen);
We have an example on how to use session properties in DLL function in the AI online documentation, please follow this link:
http://www.advancedinstaller.com/user-g ... n-dll.html
Regards,
Gigi
____________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com