0

我们正在使用带有 wix 3.10.2015 的 Visual Studio 2015。

在win7 32位上安装时我们没有问题

在 XP 上安装时,调用 dll 中的自定义操作时出现以下错误。

Action start 16:03:50: MyCustomAction.
Action ended 16:03:51: MyCustomAction. Return value 3.
Action ended 16:03:51: INSTALL. Return value 3.

这是 customAction.cpp 文件中的声明:

extern "C" _declspec(dllexport) UINT __stdcall MyCustomAction(MSIHANDLE hInstall);

extern "C" UINT __stdcall MyCustomAction(MSIHANDLE hInstall)
{
    HRESULT hr = S_OK;
    UINT er = ERROR_SUCCESS;
    // commented out code 
    return WcaFinalize(er);
}

蜡声明:

<InstallExecuteSequence>
            <Custom Action="myCustomAction" After='AppSearch' ></Custom>
</InstallExecuteSequence>

有任何想法吗 ?线索?方向将不胜感激

4

1 回答 1

1

很可能您的 Visual C++ 项目是使用“现代”工具集构建的,您应该使用支持 Windows XP 的“旧”工具集版本。

为 Windows XP 配置 C++ 11 程序

于 2016-05-11T15:48:01.187 回答