I’ve got a DLL from an old WiSE installer that i’m trying to get working in WiX, so i’m pretty sure the DLL works with MSI-based installers.
Here is my definition:
<Binary Id="SetupDLL" SourceFile="../Tools/Setup.dll" />
<CustomAction Id="ReadConfigFiles" BinaryKey="SetupDLL" DllEntry="readConfigFiles" />
and usage:
<Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="ReadConfigFiles" Order="3">1</Publish>
My C++ function looks like this:
extern "C" UINT __stdcall ReadConfigFiles(MSIHANDLE hInstall, CHAR * szDirectory)
Where exactly can I pass in parameters?
You can’t pass parameters directly because in order for this to work, your function has to be exported with exactly the right footprint. When you call
readConfigFilesin your custom action dll, it should have a footprint like this:You can use the
hInstallerparameter to read properties from the MSI. UseMsiGetProperty():Then just make sure you set the property in your .wxs file: