I have a c++ Custom action function as given below. This function is for retriving the Ini section from an INi file.
extern "C" LPSTR PASCAL EXPORT ReadFile(LPSTR IniFilename, LPSTR IniFIleSection, LPSTR IniKey, LPSTR DefaultValue)
{
static char MyValue[512];
sprintf(sValue, "%s %s %s %s",IniFilename, IniFIleSection, IniKey, DefaultValue);
GetPrivateProfileString(IniFIleSection, IniKey, DefaultValue, MyValue, 512,IniFilename);
return (sValue);
}
And i am using the Wix defenition for Customaction as given below
<Binary Id="CustomCallId" SourceFile="CustomDllname.dll" />
<CustomAction Id="ReadValue" BinaryKey="CustomCallId" DllEntry="ReadFile"/>
<InstallExecuteSequence>
<Custom Action="ReadValue" Sequence="71" />
</InstallExecuteSequence>
But i am not sure how to pass the parameter from WIX Custom call to DLL.