【发布时间】:2016-08-05 10:13:28
【问题描述】:
我有一个 c++ 自定义操作函数,如下所示。此函数用于从 INi 文件中检索 Ini 部分。
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);
}
我正在为 Customaction 使用 Wix 防御,如下所示
<Binary Id="CustomCallId" SourceFile="CustomDllname.dll" />
<CustomAction Id="ReadValue" BinaryKey="CustomCallId" DllEntry="ReadFile"/>
<InstallExecuteSequence>
<Custom Action="ReadValue" Sequence="71" />
</InstallExecuteSequence>
但我不确定如何将参数从 WIX 自定义调用传递给 DLL。
【问题讨论】:
标签: c++ visual-c++ wix windows-installer installation