Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit e192f61

Browse files
joaocgreisJulien Gilli
authored and
Julien Gilli
committed
win: fix custom actions for WiX older than 3.9
Older WiX versions included a header with extern "C" declaration, hence the custom action source must be C++. Reviewed-By: João Reis <[email protected]> PR-URL: #25569
1 parent 16bcd68 commit e192f61

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tools/msvs/msi/custom_actions.c tools/msvs/msi/custom_actions.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <wcautil.h>
77

88

9-
UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) {
9+
extern "C" UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) {
1010
HRESULT hr = S_OK;
1111
UINT er = ERROR_SUCCESS;
1212

@@ -27,7 +27,7 @@ UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) {
2727
}
2828

2929

30-
BOOL WINAPI DllMain(HINSTANCE hInst, ULONG ulReason, VOID* dummy) {
30+
extern "C" BOOL WINAPI DllMain(HINSTANCE hInst, ULONG ulReason, VOID* dummy) {
3131
switch (ulReason) {
3232
case DLL_PROCESS_ATTACH:
3333
WcaGlobalInitialize(hInst);

tools/msvs/msi/custom_actions.vcxproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
</Link>
170170
</ItemDefinitionGroup>
171171
<ItemGroup>
172-
<ClCompile Include="custom_actions.c">
172+
<ClCompile Include="custom_actions.cc">
173173
</ClCompile>
174174
</ItemGroup>
175175
<ItemGroup>

0 commit comments

Comments
 (0)