Hello and welcome to our forums,
Firstly I want to apologize for my delayed reply. We were a bit busy lately (a new release is approaching here).
Unfortunately our current implementation of the "Call function from standard DLL" custom action type doesn't have support to pass an MSIHANDLE parameter to the called DLL. This improvement is already on our TODO list and it will be available in a future version of Advanced Installer. We will notify you on this thread as soon as the improvement will be out.
Until then, as a workaround, to implicitly pass an MSIHANDLE parameter to your DLL function you can use the
"Call function from attached native DLL" custom action type. This custom action type implicitly pass the MSIHANDLE parameter to the called function. However, please note that if you need to pass another parameters to your function then this is not possible. This custom action type can pass to your function only the MSIHANDLE parameter. Any other parameter you want to pass you can save it into an
installer property which you can access from directly your function code using the
"MsiGetProperty" function.
1) How MSIHandle gets passed to the DLL custom actions? Is it an implicit arg?
Yes, this is an implicit parameter which is passed when using the "Call function from attached native DLL" or "Call function from installed native DLL" action types.
2) How can I pass an MSIHandle and more extra params? Is it possible?
Currently this can be done only by using a "Call function from attached native DLL" or "Call function from installed native DLL" action type. However, please note that this custom action types can pass to your function only the MSIHANDLE parameter. Any other parameter you want to pass you can save it into an
installer property which you can access from directly your function code using the
"MsiGetProperty" function.
All the best,
Daniel
FOLLOW US
Get the latest news in Application Packaging