我有一个C++自定义动作函数,如下所示。此功能用于从INi文件中检索Ini部分。WIX将参数传递给C++自定义动作
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);
}
,我使用的维克斯defenition为Customaction低于
<Binary Id="CustomCallId" SourceFile="CustomDllname.dll" />
<CustomAction Id="ReadValue" BinaryKey="CustomCallId" DllEntry="ReadFile"/>
<InstallExecuteSequence>
<Custom Action="ReadValue" Sequence="71" />
</InstallExecuteSequence>
给出,但我不知道如何通过从维克斯自定义调用DLL的参数。
InstallShield虽然有一个很好的模式。 (标准DLL)。 –